aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-14 01:56:25 -0700
committerfriendica <info@friendica.com>2013-09-14 01:56:25 -0700
commit94417eecbae6ca678f402458373406d64efde3d6 (patch)
tree85e18de05d9f138182178e6bc3630c212c864d54 /include
parent83e086edcd4d13b2e8508eb17a24a849c8e3aa06 (diff)
downloadvolse-hubzilla-94417eecbae6ca678f402458373406d64efde3d6.tar.gz
volse-hubzilla-94417eecbae6ca678f402458373406d64efde3d6.tar.bz2
volse-hubzilla-94417eecbae6ca678f402458373406d64efde3d6.zip
import_xchan - check every known hubloc/location field and create a new hubloc if anything at all changed anywhere.
Diffstat (limited to 'include')
-rw-r--r--include/zot.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php
index f34344739..a690d8346 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -578,13 +578,18 @@ function import_xchan($arr) {
}
}
- $r = q("select * from hubloc where hubloc_hash = '%s' and hubloc_guid = '%s' and hubloc_guid_sig = '%s'
- and hubloc_url = '%s' and hubloc_url_sig = '%s' limit 1",
+ // match as many fields as possible in case anything at all changed.
+
+ $r = q("select * from hubloc where hubloc_hash = '%s' and hubloc_guid = '%s' and hubloc_guid_sig = '%s' and hubloc_url = '%s' and hubloc_url_sig = '%s' and hubloc_host = '%s' and hubloc_addr = '%s' and hubloc_callback = '%s' and hubloc_sitekey = '%s' limit 1",
dbesc($xchan_hash),
dbesc($arr['guid']),
dbesc($arr['guid_sig']),
dbesc($location['url']),
- dbesc($location['url_sig'])
+ dbesc($location['url_sig']),
+ dbesc($location['host']),
+ dbesc($location['address']),
+ dbesc($location['callback']),
+ dbesc($location['sitekey'])
);
if($r) {
logger('import_xchan: hub exists: ' . $location['url']);
@@ -600,7 +605,6 @@ function import_xchan($arr) {
dbesc(datetime_convert()),
intval($r[0]['hubloc_id'])
);
-
$changed = true;
}
continue;