show bookmarks menu only if we have any bookmarks already
This commit is contained in:
@@ -124,7 +124,17 @@ function menu_list($channel_id, $name = '', $flags = 0) {
|
||||
return $r;
|
||||
}
|
||||
|
||||
function menu_list_count($channel_id, $name = '', $flags = 0) {
|
||||
|
||||
$sel_options = '';
|
||||
$sel_options .= (($name) ? " and menu_name = '" . protect_sprintf(dbesc($name)) . "' " : '');
|
||||
$sel_options .= (($flags) ? " and menu_flags = " . intval($flags) . " " : '');
|
||||
|
||||
$r = q("select count(*) as total from menu where menu_channel_id = %d $sel_options",
|
||||
intval($channel_id)
|
||||
);
|
||||
return $r[0]['total'];
|
||||
}
|
||||
|
||||
function menu_edit($arr) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user