From a2146021f3218ae66d32d6a28f3a79a2d1cee6ac Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 1 Sep 2014 16:32:35 -0700 Subject: use feed icon as default avatar for rss connections --- images/rss_icon.png | Bin 0 -> 9478 bytes include/Contact.php | 2 +- include/network.php | 7 +++++-- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 images/rss_icon.png diff --git a/images/rss_icon.png b/images/rss_icon.png new file mode 100644 index 000000000..9ad743d48 Binary files /dev/null and b/images/rss_icon.png differ diff --git a/include/Contact.php b/include/Contact.php index 66c94ef50..a9e737bde 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -323,7 +323,7 @@ function mark_orphan_hubsxchans() { return; $r = q("update hubloc set hubloc_status = (hubloc_status | %d) where not (hubloc_status & %d) - and hubloc_connected < utc_timestamp() - interval 36 day", + and hubloc_network != 'zot' and hubloc_connected < utc_timestamp() - interval 36 day", intval(HUBLOC_OFFLINE), intval(HUBLOC_OFFLINE) ); diff --git a/include/network.php b/include/network.php index 89bcbdc25..c44ed77c4 100644 --- a/include/network.php +++ b/include/network.php @@ -938,6 +938,9 @@ function discover_by_url($url,$arr = null) { if($r) return true; + if(! $photo) + $photo = z_root() . '/images/rss_icon.png'; + $r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_pubkey, xchan_addr, xchan_url, xchan_name, xchan_network, xchan_instance_url, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s') ", dbesc($guid), dbesc($guid), @@ -950,9 +953,9 @@ function discover_by_url($url,$arr = null) { dbesc(datetime_convert()) ); - $photos = import_profile_photo($photo,$profile); + $photos = import_profile_photo($photo,$guid); $r = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_hash = '%s' limit 1", - dbesc(datetime_convert('UTC','UTC',$arr['photo_updated'])), + dbesc(datetime_convert()), dbesc($photos[0]), dbesc($photos[1]), dbesc($photos[2]), -- cgit v1.2.3