aboutsummaryrefslogtreecommitdiffstats
path: root/include/nav.php
diff options
context:
space:
mode:
authorPaolo Tacconi <p.tacconi@giunti.it>2014-09-25 08:44:07 +0200
committerPaolo Tacconi <p.tacconi@giunti.it>2014-09-25 08:44:07 +0200
commit6324a07dd8b17db5da0ce66c99fb69e2f3ec49e1 (patch)
tree89e81409add34df97f633515181790d6aed4c726 /include/nav.php
parent7da97c198182f8f6f4286e16d80de205431d81bb (diff)
parent92c723d37cd8ded2183d3334eb51e740170e191b (diff)
downloadvolse-hubzilla-6324a07dd8b17db5da0ce66c99fb69e2f3ec49e1.tar.gz
volse-hubzilla-6324a07dd8b17db5da0ce66c99fb69e2f3ec49e1.tar.bz2
volse-hubzilla-6324a07dd8b17db5da0ce66c99fb69e2f3ec49e1.zip
Rebase from upstream
Diffstat (limited to 'include/nav.php')
-rw-r--r--include/nav.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/nav.php b/include/nav.php
index 799faf5ce..98d1b644e 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())
@@ -241,7 +246,7 @@ EOT;
'$sitelocation' => $sitelocation,
'$nav' => $x['nav'],
'$banner' => $banner,
- '$emptynotifications' => t('Nothing new here'),
+ '$emptynotifications' => t('Loading...'),
'$userinfo' => $x['usermenu'],
'$localuser' => local_user(),
'$sel' => $a->nav_sel,