aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-08-27 21:22:59 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-08-27 21:22:59 -0700
commit3fbb955cf23c5f92ba96086841ac6a2c510d4870 (patch)
treedf5eb95ca024960e0bd0599a49c663fe7131d81d /mod
parent04b4897dd86d862957d95a5d6090af7a026dd82c (diff)
downloadvolse-hubzilla-3fbb955cf23c5f92ba96086841ac6a2c510d4870.tar.gz
volse-hubzilla-3fbb955cf23c5f92ba96086841ac6a2c510d4870.tar.bz2
volse-hubzilla-3fbb955cf23c5f92ba96086841ac6a2c510d4870.zip
start conversion to AccessList object
Diffstat (limited to 'mod')
-rw-r--r--mod/mitem.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/mod/mitem.php b/mod/mitem.php
index bc93165ac..3959da032 100644
--- a/mod/mitem.php
+++ b/mod/mitem.php
@@ -2,6 +2,7 @@
require_once('include/menu.php');
require_once('include/acl_selectors.php');
+require_once('include/AccessList.php');
function mitem_init(&$a) {
@@ -125,12 +126,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');
@@ -151,7 +147,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'))),