aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-01-17 13:52:55 +0000
committerMario <mario@mariovavti.com>2021-01-17 13:52:55 +0000
commita925b08e80bc740ea9d23b1dfb7adbf94491ed09 (patch)
tree0196eabbf7cb8cc796ff9383a41fe689a2b5eeb7 /include
parent46aefd88832461d762a218fa08e8dfd02d19931a (diff)
downloadvolse-hubzilla-a925b08e80bc740ea9d23b1dfb7adbf94491ed09.tar.gz
volse-hubzilla-a925b08e80bc740ea9d23b1dfb7adbf94491ed09.tar.bz2
volse-hubzilla-a925b08e80bc740ea9d23b1dfb7adbf94491ed09.zip
get_bookmark_link() check against zot6
Diffstat (limited to 'include')
-rw-r--r--include/bookmarks.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/bookmarks.php b/include/bookmarks.php
index 21456c871..145119347 100644
--- a/include/bookmarks.php
+++ b/include/bookmarks.php
@@ -18,7 +18,7 @@ function bookmark_add($channel,$sender,$taxonomy,$private,$opts = null) {
$channel_id = $channel['channel_id'];
if($private)
- $iarr['contact_allow'] = array($channel['channel_hash']);
+ $iarr['contact_allow'] = array($channel['channel_hash']);
$iarr['mitem_link'] = $taxonomy['url'];
$iarr['mitem_desc'] = $taxonomy['term'];
$iarr['mitem_flags'] = (($ischat) ? MENU_ITEM_CHATROOM : 0);
@@ -41,34 +41,34 @@ function bookmark_add($channel,$sender,$taxonomy,$private,$opts = null) {
if(! $menu_id) {
$x = menu_list($arr['menu_channel_id'],$arr['menu_name'],$arr['menu_flags']);
- if($x)
+ if($x)
$menu_id = $x[0]['menu_id'];
- else
+ else
$menu_id = menu_create($arr);
}
if(! $menu_id) {
logger('bookmark_add: unable to create menu ' . $arr['menu_name']);
- return;
+ return;
}
logger('add_bookmark: menu_id ' . $menu_id);
$r = q("select * from menu_item where mitem_link = '%s' and mitem_menu_id = %d and mitem_channel_id = %d limit 1",
dbesc($iarr['mitem_link']),
intval($menu_id),
- intval($channel_id)
+ intval($channel_id)
);
if($r)
logger('add_bookmark: duplicate menu entry', LOGGER_DEBUG);
if(! $r) {
$r = menu_add_item($menu_id,$channel_id,$iarr);
- menu_sync_packet($channel_id,get_observer_hash(),$menu_id);
+ menu_sync_packet($channel_id,get_observer_hash(),$menu_id);
}
return $r;
}
function get_bookmark_link($observer) {
- if((! $observer) || ($observer['xchan_network'] !== 'zot'))
+ if((! $observer) || !in_array($observer['xchan_network'], ['zot6', 'zot']))
return '';
$h = @parse_url($observer['xchan_url']);