diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-05-29 17:51:50 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-05-29 17:51:50 +0200 |
commit | 2514af652490ebe4d379a32c339dd23d9b321897 (patch) | |
tree | 6bdf0ec557b5d0f78ae077b68df3813e218b013f /include | |
parent | 8516b3259ffa4f09ef3f99bde2c66e590ba0c002 (diff) | |
download | volse-hubzilla-2514af652490ebe4d379a32c339dd23d9b321897.tar.gz volse-hubzilla-2514af652490ebe4d379a32c339dd23d9b321897.tar.bz2 volse-hubzilla-2514af652490ebe4d379a32c339dd23d9b321897.zip |
fix menu render for menu item edit - menu preview
Diffstat (limited to 'include')
-rw-r--r-- | include/menu.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/menu.php b/include/menu.php index ae53945ef..2b61ebd34 100644 --- a/include/menu.php +++ b/include/menu.php @@ -66,13 +66,17 @@ function menu_element($menu) { -function menu_render($menu, $class='', $edit = false, $var = '') { +function menu_render($menu, $class='', $edit = false, $var = array()) { if(! $menu) return ''; $channel_id = ((is_array(get_app()->profile)) ? get_app()->profile['profile_uid'] : 0); + if ((! $channel_id) && (local_channel())) + $channel_id = local_channel(); + $menu_list = menu_list($channel_id); + $menu_names = array(); foreach($menu_list as $menus) { if($menus['menu_name'] != $menu['menu']['menu_name']) |