aboutsummaryrefslogtreecommitdiffstats
path: root/include/nav.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-20 16:22:21 -0700
committerfriendica <info@friendica.com>2014-09-20 16:22:21 -0700
commit44cb423f21b6a34a138e7ffd2814fdd08788cfbe (patch)
treebbd84e79b59b3e6ccd848758a65aeae9033d37fa /include/nav.php
parent8d23a8da8dd7326d6ce9c3a64f96e5325a09d4a1 (diff)
parenta1773fea2529e6e3b1dcc816e948dacb4a250705 (diff)
downloadvolse-hubzilla-44cb423f21b6a34a138e7ffd2814fdd08788cfbe.tar.gz
volse-hubzilla-44cb423f21b6a34a138e7ffd2814fdd08788cfbe.tar.bz2
volse-hubzilla-44cb423f21b6a34a138e7ffd2814fdd08788cfbe.zip
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'include/nav.php')
-rw-r--r--include/nav.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/nav.php b/include/nav.php
index 799faf5ce..714f4b63d 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -105,14 +105,19 @@ EOT;
$nav['usermenu'][] = Array('cloud/' . $channel['channel_address'],t('Files'),"",t('Your files'));
require_once('include/chat.php');
- $chats = chatroom_list(local_user());
- if (count($chats)) {
+ $has_chats = chatroom_list_count(local_user());
+ if($has_chats) {
$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())