aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-03 15:54:38 -0800
committerfriendica <info@friendica.com>2015-03-03 15:54:38 -0800
commit99e4d2362c3e02f7ef593208a365d81254c25156 (patch)
tree7cbe2da43dc9e74c2cd1355b27785f5b896fcf4a /include
parent85f79990af13a2c71aa9c053761de6dbf8f37841 (diff)
downloadvolse-hubzilla-99e4d2362c3e02f7ef593208a365d81254c25156.tar.gz
volse-hubzilla-99e4d2362c3e02f7ef593208a365d81254c25156.tar.bz2
volse-hubzilla-99e4d2362c3e02f7ef593208a365d81254c25156.zip
I'm going to use the site_update timestamp to indicate whenever we successfully connect with a site. This way we can mark hubs dead on non-directory servers; but we have to wait before implementing this until we have a history of site_update being updated.
Diffstat (limited to 'include')
-rw-r--r--include/zot.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 29513b8c5..670583929 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -984,6 +984,14 @@ function zot_process_response($hub,$arr,$outq) {
logger('zot_process_response: headers: ' . print_r($arr['header'],true), LOGGER_DATA);
}
+ // update the timestamp for this site
+
+ $r = q("update site set site_update = '%s' where site_url = '%s'",
+ dbesc(datetime_convert()),
+ dbesc(dirname($hub))
+ );
+
+
// synchronous message types are handled immediately
// async messages remain in the queue until processed.
@@ -2585,6 +2593,13 @@ function import_site($arr,$pubkey) {
logger('import_site: update failed. ' . print_r($arr,true));
}
}
+ else {
+ // update the timestamp to indicate we communicated with this site
+ q("update site set site_update = '%s' where site_url = '%s'",
+ dbesc(datetime_convert()),
+ dbesc($url)
+ );
+ }
}
else {
$update = true;