Screwed up merge - put Mike's stuff back.

This commit is contained in:
Thomas Willingham 2014-10-20 19:35:02 +01:00
parent 48b2eafcaa
commit 58431f948e

View File

@ -263,7 +263,7 @@ function poller_run($argv, $argc){
); );
$contacts = q("SELECT abook_id, abook_flags, abook_updated, abook_connected, abook_closeness, abook_channel $contacts = q("SELECT abook_id, abook_flags, abook_updated, abook_connected, abook_closeness, abook_xchan, abook_channel
FROM abook LEFT JOIN account on abook_account = account_id where 1 FROM abook LEFT JOIN account on abook_account = account_id where 1
$sql_extra $sql_extra
AND (( abook_flags & %d ) OR ( abook_flags = %d )) AND (( abook_flags & %d ) OR ( abook_flags = %d ))
@ -319,6 +319,10 @@ function poller_run($argv, $argc){
// He's dead, Jim // He's dead, Jim
if(strcmp(datetime_convert('UTC','UTC', 'now'),datetime_convert('UTC','UTC', $c . " + 30 day")) > 0) { if(strcmp(datetime_convert('UTC','UTC', 'now'),datetime_convert('UTC','UTC', $c . " + 30 day")) > 0) {
$n = q("select xchan_network from xchan where xchan_hash = '%s' limit 1",
dbesc($contact['abook_xchan'])
);
if($n && $n[0]['xchan_network'] == 'zot') {
$r = q("update abook set abook_flags = (abook_flags | %d) where abook_id = %d limit 1", $r = q("update abook set abook_flags = (abook_flags | %d) where abook_id = %d limit 1",
intval(ABOOK_FLAG_ARCHIVED), intval(ABOOK_FLAG_ARCHIVED),
intval($contact['abook_id']) intval($contact['abook_id'])
@ -326,6 +330,7 @@ function poller_run($argv, $argc){
$update = false; $update = false;
continue; continue;
} }
}
if($contact['abook_flags'] & ABOOK_FLAG_ARCHIVED) { if($contact['abook_flags'] & ABOOK_FLAG_ARCHIVED) {
$update = false; $update = false;