aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-05-29 17:51:50 +0200
committerMario Vavti <mario@mariovavti.com>2015-05-29 17:51:50 +0200
commit2514af652490ebe4d379a32c339dd23d9b321897 (patch)
tree6bdf0ec557b5d0f78ae077b68df3813e218b013f /include
parent8516b3259ffa4f09ef3f99bde2c66e590ba0c002 (diff)
downloadvolse-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.php6
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'])