aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-10-24 19:38:50 -0700
committerfriendica <info@friendica.com>2013-10-24 19:38:50 -0700
commit0b0bd3c20765d267ec6d7cc261c7713917a22582 (patch)
tree84c997aa781afa566536ca5f66eb8f90ef468476 /include/zot.php
parent3da20b3797b6d29d78197c16f4daac8fed6db895 (diff)
downloadvolse-hubzilla-0b0bd3c20765d267ec6d7cc261c7713917a22582.tar.gz
volse-hubzilla-0b0bd3c20765d267ec6d7cc261c7713917a22582.tar.bz2
volse-hubzilla-0b0bd3c20765d267ec6d7cc261c7713917a22582.zip
create update record for accounts on directory server itself during profile changes, re-queue failed directory sync packets, fix account_id index in queue creation, be more selective about updating hubloc_connected (only when we're talking to the associated site). But we still need a way to flag dead accounts and these mechanisms won't cut it, because it isn't a requirement that channels communicate with anybody, except for contacting the directory when the account is created. I think we need to make every channel ping the directory once a month. Then we can find those that have not done so (after syncing with other directories). We can't have the directory just flag dead accounts as this would create a way for an anti-social attacker to become a directory server and mark all the accounts dead.
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/zot.php b/include/zot.php
index 0ee099ce5..91729f9de 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -604,11 +604,14 @@ function import_xchan($arr,$ud_flags = 1) {
);
if($r) {
logger('import_xchan: hub exists: ' . $location['url']);
- // update connection timestamp
- q("update hubloc set hubloc_connected = '%s' where hubloc_id = %d limit 1",
- dbesc(datetime_convert()),
- intval($r[0]['hubloc_id'])
- );
+ // update connection timestamp if this is the site we're talking to
+ if($location['url'] == $arr['site']['url']) {
+ q("update hubloc set hubloc_connected = '%s', hubloc_updated = '%s' where hubloc_id = %d limit 1",
+ dbesc(datetime_convert()),
+ dbesc(datetime_convert()),
+ intval($r[0]['hubloc_id'])
+ );
+ }
if((($r[0]['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY) && (! $location['primary']))
|| ((! ($r[0]['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY)) && ($location['primary']))) {
$r = q("update hubloc set hubloc_flags = (hubloc_flags ^ %d), hubloc_updated = '%s' where hubloc_id = %d limit 1",