diff options
author | Hilmar R <u02@u29lx193> | 2021-02-28 21:06:16 +0100 |
---|---|---|
committer | Hilmar R <u02@u29lx193> | 2021-03-01 18:48:11 +0100 |
commit | c26dede97f626b52b7bf8962ed55d1dbda86abe8 (patch) | |
tree | 3c8c9bc97aa09f7ce9afe9bf467cf87bbf2c7d0b /include/bookmarks.php | |
parent | ea3390d626f85b7293a750958bfd1b5460958365 (diff) | |
download | volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.gz volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.tar.bz2 volse-hubzilla-c26dede97f626b52b7bf8962ed55d1dbda86abe8.zip |
get dev
Diffstat (limited to 'include/bookmarks.php')
-rw-r--r-- | include/bookmarks.php | 14 |
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']); |