1
0
Fork 0

Merge remote-tracking branch 'friendika/master'

This commit is contained in:
Fabio Comuni 2011-09-30 14:31:20 +02:00
commit 60e0f79b9f
88 changed files with 2651 additions and 693 deletions

View file

@ -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;

View file

@ -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'];
}
}

View file

@ -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;

View file

@ -177,7 +177,7 @@ function nav_set_selected($item){
'profiles' => null,
'notifications' => null,
'messages' => null,
'directyory' => null,
'directory' => null,
'settings' => null,
'contacts' => null,
);

View file

@ -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;

View file

@ -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)