zome issues registering new hubs
This commit is contained in:
parent
4108598133
commit
32a97d5065
@ -4200,6 +4200,7 @@ function fetch_post_tags($items) {
|
|||||||
$tag_finder = array();
|
$tag_finder = array();
|
||||||
if($items) {
|
if($items) {
|
||||||
foreach($items as $item) {
|
foreach($items as $item) {
|
||||||
|
if(is_array($item)) {
|
||||||
if(array_key_exists('item_id',$item)) {
|
if(array_key_exists('item_id',$item)) {
|
||||||
if(! in_array($item['item_id'],$tag_finder))
|
if(! in_array($item['item_id'],$tag_finder))
|
||||||
$tag_finder[] = $item['item_id'];
|
$tag_finder[] = $item['item_id'];
|
||||||
@ -4210,6 +4211,7 @@ function fetch_post_tags($items) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$tag_finder_str = implode(', ', $tag_finder);
|
$tag_finder_str = implode(', ', $tag_finder);
|
||||||
|
|
||||||
|
|
||||||
@ -4222,7 +4224,7 @@ function fetch_post_tags($items) {
|
|||||||
|
|
||||||
|
|
||||||
for($x = 0; $x < count($items); $x ++) {
|
for($x = 0; $x < count($items); $x ++) {
|
||||||
if(count($tags)) {
|
if($tags) {
|
||||||
foreach($tags as $t) {
|
foreach($tags as $t) {
|
||||||
if(array_key_exists('item_id',$items[$x])) {
|
if(array_key_exists('item_id',$items[$x])) {
|
||||||
if($t['oid'] == $items[$x]['item_id']) {
|
if($t['oid'] == $items[$x]['item_id']) {
|
||||||
|
@ -358,7 +358,13 @@ function zot_register_hub($arr) {
|
|||||||
|
|
||||||
$guid_hash = base64url_encode(hash('whirlpool',$arr['guid'] . $arr['guid_sig'], true));
|
$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']) {
|
if($x['success']) {
|
||||||
$record = json_decode($x['body'],true);
|
$record = json_decode($x['body'],true);
|
||||||
|
@ -42,7 +42,7 @@ function zfinger_init(&$a) {
|
|||||||
dbesc($zhash)
|
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
|
$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",
|
where channel_guid = '%s' and channel_guid_sig = '%s' limit 1",
|
||||||
dbesc($zguid),
|
dbesc($zguid),
|
||||||
|
@ -1 +1 @@
|
|||||||
2013-01-01.187
|
2013-01-02.188
|
||||||
|
Reference in New Issue
Block a user