aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2014-02-20 11:17:07 +0100
committerzottel <github@zottel.net>2014-02-20 11:17:07 +0100
commit79c566bda33645f42f8545fdc6e55af35c4a7d5c (patch)
tree7fc573bd9903150b938b11758837b02a1d157008 /include
parentb223b52f83344a7ebdea460cd534d24337f0b403 (diff)
parentd8434bb480ee4f7a94246a8623614a4c3105a2a6 (diff)
downloadvolse-hubzilla-79c566bda33645f42f8545fdc6e55af35c4a7d5c.tar.gz
volse-hubzilla-79c566bda33645f42f8545fdc6e55af35c4a7d5c.tar.bz2
volse-hubzilla-79c566bda33645f42f8545fdc6e55af35c4a7d5c.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include')
-rw-r--r--include/nav.php2
-rw-r--r--include/zot.php21
2 files changed, 13 insertions, 10 deletions
diff --git a/include/nav.php b/include/nav.php
index 8fef4a1f9..dd15ff411 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -95,7 +95,7 @@ EOT;
if($observer) {
$userinfo = array(
- 'icon' => $observer['xchan_photo_s'],
+ 'icon' => $observer['xchan_photo_m'],
'name' => $observer['xchan_addr'],
);
}
diff --git a/include/zot.php b/include/zot.php
index c9d426cc2..a7094b2ad 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -748,6 +748,16 @@ function import_xchan($arr,$ud_flags = 1) {
}
}
+ if(! $location['sitekey']) {
+ logger('import_xchan: empty hubloc sitekey. ' . print_r($location,true));
+ continue;
+ }
+
+ // Catch some malformed entries from the past which still exist
+
+ if(strpos($location['address'],'/') !== false)
+ $location['address'] = substr($location['address'],0,strpos($location['address'],'/'));
+
// 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' ",
@@ -804,14 +814,6 @@ function import_xchan($arr,$ud_flags = 1) {
continue;
}
- if(! $location['sitekey']) {
- logger('import_xchan: empty hubloc sitekey. ' . print_r($location,true));
- continue;
- }
-
- if(strpos($location['address'],'/') !== false)
- $location['address'] = substr($location['address'],0,strpos($location['address'],'/'));
-
// new hub claiming to be primary. Make it so.
if(intval($location['primary'])) {
@@ -840,9 +842,11 @@ function import_xchan($arr,$ud_flags = 1) {
);
$what .= 'newhub ';
$changed = true;
+
}
// get rid of any hubs we have for this channel which weren't reported.
+
if($xisting) {
foreach($xisting as $x) {
if(! array_key_exists('updated',$x)) {
@@ -855,7 +859,6 @@ function import_xchan($arr,$ud_flags = 1) {
}
}
}
-
}
// Are we a directory server of some kind?