aboutsummaryrefslogtreecommitdiffstats
path: root/include/menu.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-05-10 21:52:48 +0200
committerMario Vavti <mario@mariovavti.com>2015-05-10 21:52:48 +0200
commit70e5bf04e160bf1e3f2673f4405ac6a6adecb485 (patch)
treee1e1ea0b47813f6fc3c1193c6d0ef31969111818 /include/menu.php
parentca36fce9a74a92318e6f5cbbc341210e994db2df (diff)
downloadvolse-hubzilla-70e5bf04e160bf1e3f2673f4405ac6a6adecb485.tar.gz
volse-hubzilla-70e5bf04e160bf1e3f2673f4405ac6a6adecb485.tar.bz2
volse-hubzilla-70e5bf04e160bf1e3f2673f4405ac6a6adecb485.zip
uid > channel id to make submenus visible for observers
Diffstat (limited to 'include/menu.php')
-rw-r--r--include/menu.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/menu.php b/include/menu.php
index 84ea78f00..5c0811437 100644
--- a/include/menu.php
+++ b/include/menu.php
@@ -29,8 +29,8 @@ function menu_render($menu, $class='', $edit = false, $var = '') {
if(! $menu)
return '';
- $uid = local_channel();
- $menu_list = menu_list($uid);
+ $channel_id = ((is_array(get_app()->profile)) ? get_app()->profile['profile_uid'] : 0);
+ $menu_list = menu_list($channel_id);
foreach($menu_list as $menus) {
if($menus['menu_name'] != $menu['menu']['menu_name'])
@@ -39,7 +39,7 @@ function menu_render($menu, $class='', $edit = false, $var = '') {
for($x = 0; $x < count($menu['items']); $x ++) {
if(in_array($menu['items'][$x]['mitem_link'], $menu_names)) {
- $m = menu_fetch($menu['items'][$x]['mitem_link'],local_channel(), get_observer_hash());
+ $m = menu_fetch($menu['items'][$x]['mitem_link'], $channel_id, get_observer_hash());
$submenu = menu_render($m, 'dropdown-menu', $edit = false, $var = array('wrap' => 'none'));
$menu['items'][$x]['submenu'] = $submenu;
}