fix sys channel menu in a morre standard way
This commit is contained in:
parent
6ca4240d96
commit
f81874ca49
@ -37,7 +37,7 @@ function menu_post(&$a) {
|
|||||||
$_REQUEST['menu_id'] = intval(argv(1));
|
$_REQUEST['menu_id'] = intval(argv(1));
|
||||||
$r = menu_edit($_REQUEST);
|
$r = menu_edit($_REQUEST);
|
||||||
if($r) {
|
if($r) {
|
||||||
//info( t('Menu updated.') . EOL);
|
info( t('Menu updated.') . EOL);
|
||||||
goaway(z_root() . '/mitem/' . $menu_id . (($a->is_sys) ? '?f=&sys=1' : ''));
|
goaway(z_root() . '/mitem/' . $menu_id . (($a->is_sys) ? '?f=&sys=1' : ''));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -46,7 +46,7 @@ function menu_post(&$a) {
|
|||||||
else {
|
else {
|
||||||
$r = menu_create($_REQUEST);
|
$r = menu_create($_REQUEST);
|
||||||
if($r) {
|
if($r) {
|
||||||
//info( t('Menu created.') . EOL);
|
info( t('Menu created.') . EOL);
|
||||||
goaway(z_root() . '/mitem/' . $r . (($a->is_sys) ? '?f=&sys=1' : ''));
|
goaway(z_root() . '/mitem/' . $r . (($a->is_sys) ? '?f=&sys=1' : ''));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -149,7 +149,6 @@ function mitem_content(&$a) {
|
|||||||
|
|
||||||
$create = replace_macros(get_markup_template('mitemedit.tpl'), array(
|
$create = replace_macros(get_markup_template('mitemedit.tpl'), array(
|
||||||
'$menu_id' => $a->data['menu']['menu_id'],
|
'$menu_id' => $a->data['menu']['menu_id'],
|
||||||
'$action' => 'mitem/' . $a->data['menu']['menu_id'] . (($a->is_sys) ? '?f=&sys=1' : ''),
|
|
||||||
'$permissions' => t('Menu Item Permissions'),
|
'$permissions' => t('Menu Item Permissions'),
|
||||||
'$permdesc' => t("\x28click to open/close\x29"),
|
'$permdesc' => t("\x28click to open/close\x29"),
|
||||||
'$aclselect' => populate_acl($perm_defaults,false),
|
'$aclselect' => populate_acl($perm_defaults,false),
|
||||||
@ -162,7 +161,8 @@ function mitem_content(&$a) {
|
|||||||
'$submit_more' => t('Submit and continue'),
|
'$submit_more' => t('Submit and continue'),
|
||||||
'$display' => $display,
|
'$display' => $display,
|
||||||
'$lockstate' => $lockstate,
|
'$lockstate' => $lockstate,
|
||||||
'$menu_names' => $menu_names
|
'$menu_names' => $menu_names,
|
||||||
|
'$sys' => $a->is_sys
|
||||||
));
|
));
|
||||||
|
|
||||||
$o .= replace_macros(get_markup_template('mitemlist.tpl'),array(
|
$o .= replace_macros(get_markup_template('mitemlist.tpl'),array(
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div id="menu-element-creator" class="section-content-tools-wrapper" style="display: {{$display}};">
|
<div id="menu-element-creator" class="section-content-tools-wrapper" style="display: {{$display}};">
|
||||||
<form id="mitemedit" action="{{$action}}" method="post" >
|
<form id="mitemedit" action="mitem/{{$menu_id}}{{if $mitem_id}}/{{$mitem_id}}{{/if}}{{if $sys}}?f=&sys=1{{/if}}" method="post" >
|
||||||
<input type="hidden" name="menu_id" value="{{$menu_id}}" />
|
<input type="hidden" name="menu_id" value="{{$menu_id}}" />
|
||||||
{{if $mitem_id}}
|
{{if $mitem_id}}
|
||||||
<input type="hidden" name="mitem_id" value="{{$mitem_id}}" />
|
<input type="hidden" name="mitem_id" value="{{$mitem_id}}" />
|
||||||
|
Reference in New Issue
Block a user