diff options
author | marijus <mario@mariovavti.com> | 2014-09-20 16:31:56 +0200 |
---|---|---|
committer | marijus <mario@mariovavti.com> | 2014-09-20 16:31:56 +0200 |
commit | bd54358aa6bfe90bfbc8aed7baf3a8110d6e45ba (patch) | |
tree | 54d5f45f497c5ff3cfd48c316aa3df9a0da60e50 /include/nav.php | |
parent | 9feb619bea39824823ce39ca203b92fb6b68e6fb (diff) | |
download | volse-hubzilla-bd54358aa6bfe90bfbc8aed7baf3a8110d6e45ba.tar.gz volse-hubzilla-bd54358aa6bfe90bfbc8aed7baf3a8110d6e45ba.tar.bz2 volse-hubzilla-bd54358aa6bfe90bfbc8aed7baf3a8110d6e45ba.zip |
show bookmarks menu only if we have any bookmarks already
Diffstat (limited to 'include/nav.php')
-rw-r--r-- | include/nav.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/nav.php b/include/nav.php index 799faf5ce..c6bc4d293 100644 --- a/include/nav.php +++ b/include/nav.php @@ -110,9 +110,14 @@ EOT; $nav['usermenu'][] = Array('chat/' . $channel['channel_address'],t('Chat'),"",t('Your chatrooms')); } - $nav['usermenu'][] = Array('bookmarks', t('Bookmarks'), "", t('Your bookmarks')); + require_once('include/menu.php'); + $has_bookmarks = menu_list_count(local_user(),'',MENU_BOOKMARK) + menu_list_count(local_user(),'',MENU_SYSTEM|MENU_BOOKMARK); + if($has_bookmarks) { + $nav['usermenu'][] = Array('bookmarks', t('Bookmarks'), "", t('Your bookmarks')); + } + if(feature_enabled($channel['channel_id'],'webpages')) - $nav['usermenu'][] = Array('webpages/' . $channel['channel_address'],t('Webpages'),"",t('Your webpages')); + $nav['usermenu'][] = Array('webpages/' . $channel['channel_address'],t('Webpages'),"",t('Your webpages')); } else { if(! get_account_id()) |