aboutsummaryrefslogtreecommitdiffstats
path: root/include/poller.php
diff options
context:
space:
mode:
authorThomas Willingham <beardyunixer@beardyunixer.com>2014-10-20 19:35:02 +0100
committerThomas Willingham <beardyunixer@beardyunixer.com>2014-10-20 19:35:02 +0100
commit58431f948eb5e1d23548b537fdb92dea7d79e196 (patch)
treee3ceaa7bee49a3c2c3eb3b22e61659d74aae773a /include/poller.php
parent48b2eafcaaaa8cc05947c4b4b64c3e9daa78c2f4 (diff)
downloadvolse-hubzilla-58431f948eb5e1d23548b537fdb92dea7d79e196.tar.gz
volse-hubzilla-58431f948eb5e1d23548b537fdb92dea7d79e196.tar.bz2
volse-hubzilla-58431f948eb5e1d23548b537fdb92dea7d79e196.zip
Screwed up merge - put Mike's stuff back.
Diffstat (limited to 'include/poller.php')
-rw-r--r--include/poller.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/poller.php b/include/poller.php
index 61d8b87cc..d18cb1ca6 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -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
$sql_extra
AND (( abook_flags & %d ) OR ( abook_flags = %d ))
@@ -319,12 +319,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) {