aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-20 17:03:11 -0700
committerzotlabs <mike@macgirvin.com>2017-06-20 17:03:11 -0700
commit08d9316d763defc0fc2f408de6baff9e79853863 (patch)
treed48b6d475140e1224050cf375e9693259a2307c5 /include/zot.php
parent0233e9ad2a8c210f29c553a791b85d52cd6d5d85 (diff)
downloadvolse-hubzilla-08d9316d763defc0fc2f408de6baff9e79853863.tar.gz
volse-hubzilla-08d9316d763defc0fc2f408de6baff9e79853863.tar.bz2
volse-hubzilla-08d9316d763defc0fc2f408de6baff9e79853863.zip
more import_author_zot fixes
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php
index 9458b1f1e..9261b0ebb 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -3584,6 +3584,11 @@ function import_author_zot($x) {
$hash = make_xchan_hash($x['guid'],$x['guid_sig']);
+ if(array_key_exists('url',$x)) {
+ $m = parse_url($x['url']);
+ $desturl = $m['scheme'] . '://' . $m['host'];
+ }
+
$r1 = q("select hubloc_url, hubloc_updated, site_dead from hubloc left join site on
hubloc_url = site_url where hubloc_guid = '%s' and hubloc_guid_sig = '%s' and hubloc_primary = 1 limit 1",
dbesc($x['guid']),
@@ -3625,14 +3630,16 @@ function import_author_zot($x) {
);
if($r) {
logger('found another site that is not dead: ' . $r[0]['hubloc_url'], LOGGER_DEBUG,LOG_INFO);
- $x['url'] = $r[0]['hubloc_url'];
+ $desturl = $r[0]['hubloc_url'];
}
else {
return $hash;
}
}
- $them = array('hubloc_url' => $x['url'], 'xchan_guid' => $x['guid'], 'xchan_guid_sig' => $x['guid_sig']);
+
+
+ $them = array('hubloc_url' => $desturl, 'xchan_guid' => $x['guid'], 'xchan_guid_sig' => $x['guid_sig']);
if(zot_refresh($them))
return $hash;