diff options
author | zotlabs <mike@macgirvin.com> | 2018-06-10 19:26:35 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-06-10 19:26:35 -0700 |
commit | 912ccb31a133c09b28890f0bab5be5ce1f7f95d4 (patch) | |
tree | 9bd9d6813081853e086dbd3564038facae309158 | |
parent | 6959c9e42350b7d19402bef24bb4fd366af22ed4 (diff) | |
download | volse-hubzilla-912ccb31a133c09b28890f0bab5be5ce1f7f95d4.tar.gz volse-hubzilla-912ccb31a133c09b28890f0bab5be5ce1f7f95d4.tar.bz2 volse-hubzilla-912ccb31a133c09b28890f0bab5be5ce1f7f95d4.zip |
hubzilla core issue #1218
-rw-r--r-- | include/menu.php | 5 | ||||
-rw-r--r-- | view/tpl/usermenu.tpl | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/menu.php b/include/menu.php index 4add78c39..1a2059451 100644 --- a/include/menu.php +++ b/include/menu.php @@ -81,6 +81,10 @@ function menu_render($menu, $class='', $edit = false, $var = array()) { if ((! $channel_id) && (local_channel())) $channel_id = local_channel(); + $chan = channelx_by_n($channel_id); + if(! $chan) + return ''; + $menu_list = menu_list($channel_id); $menu_names = array(); @@ -110,6 +114,7 @@ function menu_render($menu, $class='', $edit = false, $var = array()) { $ret = replace_macros(get_markup_template('usermenu.tpl'),array( '$menu' => $menu['menu'], '$class' => $class, + '$nick' => $chan['channel_address'], '$edit' => (($edit) ? t("Edit") : ''), '$id' => $menu['menu']['menu_id'], '$items' => $menu['items'], diff --git a/view/tpl/usermenu.tpl b/view/tpl/usermenu.tpl index c51728c34..8bbfedd07 100644 --- a/view/tpl/usermenu.tpl +++ b/view/tpl/usermenu.tpl @@ -2,7 +2,7 @@ <div id="pmenu-{{$id}}" class="pmenu{{if !$class}} widget{{else}} {{$class}}{{/if}}"> {{/if}} {{if $menu.menu_desc}} - <h3 class="pmenu-title">{{$menu.menu_desc}}{{if $edit}} <a href="mitem/{{$menu.menu_id}}" title="{{$edit}}"><i class="fa fa-pencil fakelink" title="{{$edit}}"></i></a>{{/if}}</h3> + <h3 class="pmenu-title">{{$menu.menu_desc}}{{if $edit}} <a href="mitem/{{$nick}}/{{$menu.menu_id}}" title="{{$edit}}"><i class="fa fa-pencil fakelink" title="{{$edit}}"></i></a>{{/if}}</h3> {{/if}} {{if $items}} <ul class="pmenu-body{{if $wrap || !$class}} nav nav-pills flex-column{{elseif !$wrap || $class}} {{$class}}{{/if}}"> |