diff options
author | friendica <info@friendica.com> | 2013-01-02 16:28:47 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-02 16:28:47 -0800 |
commit | 32a97d5065efbcc6897ef7598343c6973114fff4 (patch) | |
tree | 9d37176d2d9f2bdf7bc26c4db3a35e5b9fc1a82c | |
parent | 4108598133eae97e7c8a0b8e13ead4856f423cff (diff) | |
download | volse-hubzilla-32a97d5065efbcc6897ef7598343c6973114fff4.tar.gz volse-hubzilla-32a97d5065efbcc6897ef7598343c6973114fff4.tar.bz2 volse-hubzilla-32a97d5065efbcc6897ef7598343c6973114fff4.zip |
zome issues registering new hubs
-rwxr-xr-x | include/items.php | 18 | ||||
-rw-r--r-- | include/zot.php | 8 | ||||
-rw-r--r-- | mod/zfinger.php | 2 | ||||
-rw-r--r-- | version.inc | 2 |
4 files changed, 19 insertions, 11 deletions
diff --git a/include/items.php b/include/items.php index 3cfdd59da..432f26804 100755 --- a/include/items.php +++ b/include/items.php @@ -4200,13 +4200,15 @@ function fetch_post_tags($items) { $tag_finder = array(); if($items) { foreach($items as $item) { - if(array_key_exists('item_id',$item)) { - if(! in_array($item['item_id'],$tag_finder)) - $tag_finder[] = $item['item_id']; - } - else { - if(! in_array($item['id'],$tag_finder)) - $tag_finder[] = $item['id']; + if(is_array($item)) { + if(array_key_exists('item_id',$item)) { + if(! in_array($item['item_id'],$tag_finder)) + $tag_finder[] = $item['item_id']; + } + else { + if(! in_array($item['id'],$tag_finder)) + $tag_finder[] = $item['id']; + } } } } @@ -4222,7 +4224,7 @@ function fetch_post_tags($items) { for($x = 0; $x < count($items); $x ++) { - if(count($tags)) { + if($tags) { foreach($tags as $t) { if(array_key_exists('item_id',$items[$x])) { if($t['oid'] == $items[$x]['item_id']) { diff --git a/include/zot.php b/include/zot.php index 46f0bd397..5771b67d1 100644 --- a/include/zot.php +++ b/include/zot.php @@ -358,7 +358,13 @@ function zot_register_hub($arr) { $guid_hash = base64url_encode(hash('whirlpool',$arr['guid'] . $arr['guid_sig'], true)); - $x = z_fetch_url($arr['url'] . '/.well-known/zot-info/?f=&hash=' . $guid_hash); + $url = $arr['url'] . '/.well-known/zot-info/?f=&guid_hash=' . $guid_hash; + + logger('zot_register_hub: ' . $url); + + $x = z_fetch_url($url); + + logger('zot_register_hub: ' . print_r($x,true)); if($x['success']) { $record = json_decode($x['body'],true); diff --git a/mod/zfinger.php b/mod/zfinger.php index b1de33fb7..b13af50b7 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -42,7 +42,7 @@ function zfinger_init(&$a) { dbesc($zhash) ); } - if(strlen($zguid) && strlen($zguid_sig)) { + elseif(strlen($zguid) && strlen($zguid_sig)) { $r = q("select channel.*, xchan.* from channel left join xchan on channel_hash = xchan_hash where channel_guid = '%s' and channel_guid_sig = '%s' limit 1", dbesc($zguid), diff --git a/version.inc b/version.inc index 634eab4e6..f3645eb72 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2013-01-01.187 +2013-01-02.188 |