diff options
author | pafcu <pafcu@iki.fi> | 2014-10-21 00:02:08 +0300 |
---|---|---|
committer | pafcu <pafcu@iki.fi> | 2014-10-21 00:02:08 +0300 |
commit | 6fbd77069b8792b48cfbd45bd476b8acb5f98ed6 (patch) | |
tree | 7f1303769398dc0862a2941e64e7a42e4e39d10d /include/poller.php | |
parent | 6ee514579f85927e60fa5ebd2b89f97cbfe6544d (diff) | |
parent | c080c420ba4e9f216708b63fdddb5c03bbea72c9 (diff) | |
download | volse-hubzilla-6fbd77069b8792b48cfbd45bd476b8acb5f98ed6.tar.gz volse-hubzilla-6fbd77069b8792b48cfbd45bd476b8acb5f98ed6.tar.bz2 volse-hubzilla-6fbd77069b8792b48cfbd45bd476b8acb5f98ed6.zip |
Merge pull request #2 from friendica/master
Sync with upstream
Diffstat (limited to 'include/poller.php')
-rw-r--r-- | include/poller.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/poller.php b/include/poller.php index 2febaeb32..61298b0ab 100644 --- a/include/poller.php +++ b/include/poller.php @@ -254,7 +254,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 $sql_extra AND (( abook_flags & %d ) OR ( abook_flags = %d )) @@ -310,12 +310,17 @@ function poller_run($argv, $argc){ // He's dead, Jim if(strcmp(datetime_convert('UTC','UTC', 'now'),datetime_convert('UTC','UTC', $c . " + 30 day")) > 0) { - $r = q("update abook set abook_flags = (abook_flags | %d) where abook_id = %d limit 1", - intval(ABOOK_FLAG_ARCHIVED), - intval($contact['abook_id']) + $n = q("select xchan_network from xchan where xchan_hash = '%s' limit 1", + dbesc($contact['abook_xchan']) ); - $update = false; - continue; + if($n && $n[0]['xchan_network'] == 'zot') { + $r = q("update abook set abook_flags = (abook_flags | %d) where abook_id = %d limit 1", + intval(ABOOK_FLAG_ARCHIVED), + intval($contact['abook_id']) + ); + $update = false; + continue; + } } if($contact['abook_flags'] & ABOOK_FLAG_ARCHIVED) { |