show bookmarks menu only if we have any bookmarks already

This commit is contained in:
marijus
2014-09-20 16:31:56 +02:00
parent 9feb619bea
commit bd54358aa6
3 changed files with 20 additions and 3 deletions

View File

@@ -1556,7 +1556,9 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
);
}
if($is_owner) {
require_once('include/menu.php');
$has_bookmarks = menu_list_count(local_user(),'',MENU_BOOKMARK) + menu_list_count(local_user(),'',MENU_SYSTEM|MENU_BOOKMARK);
if($is_owner && $has_bookmarks) {
$tabs[] = array(
'label' => t('Bookmarks'),
'url' => $a->get_baseurl() . '/bookmarks',