diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Scrape.php | 2 | ||||
-rw-r--r-- | include/conversation.php | 7 | ||||
-rw-r--r-- | include/delivery.php | 2 | ||||
-rw-r--r-- | include/nav.php | 2 | ||||
-rw-r--r-- | include/notifier.php | 2 | ||||
-rw-r--r-- | include/poller.php | 13 |
6 files changed, 22 insertions, 6 deletions
diff --git a/include/Scrape.php b/include/Scrape.php index 2af02fff5..642b8e624 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -533,7 +533,7 @@ function probe_url($url, $mode = PROBE_NORMAL) { if($twitter || ! $poll) $check_feed = true; - if((! isset($vcard)) || (! $profile)) + if((! isset($vcard)) || (! x($vcard,'fn')) || (! $profile)) $check_feed = true; if(($at_addr) && (! count($links))) $check_feed = false; diff --git a/include/conversation.php b/include/conversation.php index 7859d301c..64ad5d0b1 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -220,7 +220,7 @@ function conversation(&$a, $items, $mode, $update) { $body = prepare_body($item,true); - $treads[$treadsid] .= replace_macros($tpl,array( + $tmp_item = replace_macros($tpl,array( '$id' => $item['item_id'], '$linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])), '$profile_url' => $profile_link, @@ -251,6 +251,11 @@ function conversation(&$a, $items, $mode, $update) { '$wait' => t('Please wait'), )); + $arr = array('item' => $item, 'output' => $tmp_item); + call_hooks('display_item', $arr); + + $treads[$treadsid] .= $arr['output']; + } } diff --git a/include/delivery.php b/include/delivery.php index 06cc1f679..3ab820b62 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -72,7 +72,7 @@ function delivery_run($argv, $argc){ $normal_mode = false; $expire = true; $items = q("SELECT * FROM `item` WHERE `uid` = %d AND `wall` = 1 - AND `deleted` = 1 AND `changed` > UTC_TIMESTAMP - INTERVAL 30 MINUTE", + AND `deleted` = 1 AND `changed` > UTC_TIMESTAMP() - INTERVAL 30 MINUTE", intval($item_id) ); $uid = $item_id; diff --git a/include/nav.php b/include/nav.php index b290a8da2..16ec941aa 100644 --- a/include/nav.php +++ b/include/nav.php @@ -177,7 +177,7 @@ function nav_set_selected($item){ 'profiles' => null, 'notifications' => null, 'messages' => null, - 'directyory' => null, + 'directory' => null, 'settings' => null, 'contacts' => null, ); diff --git a/include/notifier.php b/include/notifier.php index 748d15743..864fa517b 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -86,7 +86,7 @@ function notifier_run($argv, $argc){ $normal_mode = false; $expire = true; $items = q("SELECT * FROM `item` WHERE `uid` = %d AND `wall` = 1 - AND `deleted` = 1 AND `changed` > UTC_TIMESTAMP - INTERVAL 10 MINUTE", + AND `deleted` = 1 AND `changed` > UTC_TIMESTAMP() - INTERVAL 10 MINUTE", intval($item_id) ); $uid = $item_id; diff --git a/include/poller.php b/include/poller.php index 07076508f..89a3408ec 100644 --- a/include/poller.php +++ b/include/poller.php @@ -44,6 +44,12 @@ function poller_run($argv, $argc){ AND `account_expires_on` != '0000-00-00 00:00:00' AND `account_expires_on` < UTC_TIMESTAMP() "); + $abandon_days = intval(get_config('system','account_abandon_days')); + if($abandon_days < 1) + $abandon_days = 0; + + + // once daily run expire in background $d1 = get_config('system','last_expire_day'); @@ -92,12 +98,17 @@ function poller_run($argv, $argc){ // and which have a polling address and ignore Diaspora since // we are unable to match those posts with a Diaspora GUID and prevent duplicates. + $abandon_sql = (($abandon_days) + ? sprintf(" AND `user`.`login_date` > UTC_TIMESTAMP() - INTERVAL %d DAY ", intval($abandon_days)) + : '' + ); + $contacts = q("SELECT `contact`.`id` FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid` WHERE ( `rel` = %d OR `rel` = %d ) AND `poll` != '' AND `network` != '%s' $sql_extra AND `self` = 0 AND `contact`.`blocked` = 0 AND `contact`.`readonly` = 0 - AND `user`.`account_expired` = 0 ORDER BY RAND()", + AND `user`.`account_expired` = 0 $abandon_sql ORDER BY RAND()", intval(CONTACT_IS_SHARING), intval(CONTACT_IS_FRIEND), dbesc(NETWORK_DIASPORA) |