aboutsummaryrefslogtreecommitdiffstats
path: root/mod/mitem.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/mitem.php')
-rw-r--r--mod/mitem.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/mod/mitem.php b/mod/mitem.php
index 60d7885dc..d6572bd56 100644
--- a/mod/mitem.php
+++ b/mod/mitem.php
@@ -127,12 +127,7 @@ function mitem_content(&$a) {
$menu_names[] = $menus['menu_name'];
}
- $perm_defaults = array(
- 'allow_cid' => $channel['channel_allow_cid'],
- 'allow_gid' => $channel['channel_allow_gid'],
- 'deny_cid' => $channel['channel_deny_cid'],
- 'deny_gid' => $channel['channel_deny_gid']
- );
+ $acl = new AccessList($channel);
$lockstate = (($channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock');
@@ -153,7 +148,7 @@ function mitem_content(&$a) {
'$menu_id' => $a->data['menu']['menu_id'],
'$permissions' => t('Menu Item Permissions'),
'$permdesc' => t("\x28click to open/close\x29"),
- '$aclselect' => populate_acl($perm_defaults,false),
+ '$aclselect' => populate_acl($acl->get(),false),
'$mitem_desc' => array('mitem_desc', t('Link Name'), '', 'Visible name of the link','*'),
'$mitem_link' => array('mitem_link', t('Link or Submenu Target'), '', t('Enter URL of the link or select a menu name to create a submenu'), '*', 'list="menu-names"'),
'$usezid' => array('usezid', t('Use magic-auth if available'), true, '', array(t('No'), t('Yes'))),
@@ -211,6 +206,7 @@ function mitem_content(&$a) {
if(argc() == 4 && argv(3) == 'drop') {
menu_sync_packet($uid,get_observer_hash(),$mitem['mitem_menu_id']);
$r = menu_del_item($mitem['mitem_menu_id'], $uid, intval(argv(2)));
+ menu_sync_packet($uid,get_observer_hash(),$mitem['mitem_menu_id']);
if($r)
info( t('Menu item deleted.') . EOL);
else