diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-04-19 15:22:50 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-04-19 15:22:50 +0200 |
commit | 71117628bc0cba92b75caea46379b45c64c2cf43 (patch) | |
tree | 28ad9a37d0dd51d5cb94c61427f28f3fbc7e5fc7 /include/menu.php | |
parent | dd5b97639edfb5d562ced806e27e64a6bab556b8 (diff) | |
download | volse-hubzilla-71117628bc0cba92b75caea46379b45c64c2cf43.tar.gz volse-hubzilla-71117628bc0cba92b75caea46379b45c64c2cf43.tar.bz2 volse-hubzilla-71117628bc0cba92b75caea46379b45c64c2cf43.zip |
attach an id to menues, allow $menu_title to be empty, if no custom menu class is provided use default redbasic classes
Diffstat (limited to 'include/menu.php')
-rw-r--r-- | include/menu.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/menu.php b/include/menu.php index fe62d8d32..b4f4555a5 100644 --- a/include/menu.php +++ b/include/menu.php @@ -25,6 +25,7 @@ function menu_fetch($name,$uid,$observer_xchan) { } function menu_render($menu, $class='', $edit = false) { + if(! $menu) return ''; @@ -40,6 +41,7 @@ function menu_render($menu, $class='', $edit = false) { '$menu' => $menu['menu'], '$class' => $class, '$edit' => (($edit) ? t("Edit") : ''), + '$id' => $menu['menu']['menu_id'], '$items' => $menu['items'] )); } @@ -60,14 +62,13 @@ function menu_fetch_id($menu_id,$channel_id) { function menu_create($arr) { - $menu_name = trim(escape_tags($arr['menu_name'])); $menu_desc = trim(escape_tags($arr['menu_desc'])); $menu_flags = intval($arr['menu_flags']); - - if(! $menu_desc) - $menu_desc = $menu_name; + //allow menu_desc (title) to be empty + //if(! $menu_desc) + // $menu_desc = $menu_name; if(! $menu_name) return false; @@ -144,8 +145,9 @@ function menu_edit($arr) { $menu_desc = trim(escape_tags($arr['menu_desc'])); $menu_flags = intval($arr['menu_flags']); - if(! $menu_desc) - $menu_desc = $menu_name; + //allow menu_desc (title) to be empty + //if(! $menu_desc) + // $menu_desc = $menu_name; if(! $menu_name) return false; |