From a1786cbf61a3ea6ff15ebcc578e7ad9800814391 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 28 Sep 2011 04:35:44 -0700 Subject: fixes for statusnet/identi.ca empty vcard page - which appears to be deprecated. Scrape the feed for everything we used to get from the vcard. --- include/Scrape.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') 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; -- cgit v1.2.3 From ffa3b67365741d77b9a21b8505e4661668e6b561 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 28 Sep 2011 23:10:23 -0700 Subject: fix nav-selected duepuntozero --- include/nav.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') 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, ); -- cgit v1.2.3 From c1221cc052c78550c214e7974407cc66992eadbe Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 29 Sep 2011 15:52:31 -0700 Subject: add display_item hook to 'search|new' message display --- include/conversation.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/conversation.php b/include/conversation.php index ebe582f4c..6069afb03 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']; + } } -- cgit v1.2.3 From 097c1f8da774c82f441f370f391f93acc2025ccd Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 29 Sep 2011 21:20:19 -0700 Subject: do not poll for abandoned accounts --- include/poller.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include') 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) -- cgit v1.2.3 From 52557b011d2c05e83b1df91d2d766317dd2c5223 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 29 Sep 2011 21:56:44 -0700 Subject: possible sql errors --- include/delivery.php | 2 +- include/notifier.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') 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/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; -- cgit v1.2.3