aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--include/zot.php12
-rw-r--r--version.inc2
2 files changed, 9 insertions, 5 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;
diff --git a/version.inc b/version.inc
index 4c592bf06..ca5f77852 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-09-13.435
+2013-09-14.436