Commit 6177ad6b authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes: #2595 The code should follow code guidelines

parent bb225de3
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2003-2010 Cajus Pollmeier
......@@ -99,9 +98,9 @@ class acl extends plugin
while ($attrs = $ldap->fetch()) {
// Allow objects without cn to be listed without causing an error.
if (!isset($attrs['cn'][0]) && isset($attrs['uid'][0])) {
$this->users['U:'.$attrs['dn']] = $attrs['uid'][0];
$this->users['U:'.$attrs['dn']] = $attrs['uid'][0];
} elseif (!isset($attrs['uid'][0]) && isset($attrs['cn'][0])) {
$this->users['U:'.$attrs['dn']] = $attrs['cn'][0];
$this->users['U:'.$attrs['dn']] = $attrs['cn'][0];
} elseif (!isset($attrs['uid'][0]) && !isset($attrs['cn'][0])) {
$this->users['U:'.$attrs['dn']] = $attrs['dn'];
} else {
......@@ -126,21 +125,22 @@ class acl extends plugin
/* Roles */
$ldap->cd($config->current['BASE']);
$ldap->search('(objectClass=gosaRole)', array('cn', 'description','gosaAclTemplate','dn'));
while ($attrs= $ldap->fetch()) {
$dsc= "";
if (isset($attrs['description'][0])){
$dsc= $attrs['description'][0];
while ($attrs = $ldap->fetch()) {
$dsc = "";
if (isset($attrs['description'][0])) {
$dsc = $attrs['description'][0];
}
$role_id = $attrs['dn'];
$this->roles[$role_id]['acls'] =array();
for ($i= 0; $i < $attrs['gosaAclTemplate']['count']; $i++){
$acl= $attrs['gosaAclTemplate'][$i];
$this->roles[$role_id]['acls'] = array_merge($this->roles[$role_id]['acls'],acl::explodeACL($acl));
$this->roles[$role_id]['acls'] = array();
for ($i = 0; $i < $attrs['gosaAclTemplate']['count']; $i++) {
$acl = $attrs['gosaAclTemplate'][$i];
$this->roles[$role_id]['acls'] = array_merge($this->roles[$role_id]['acls'], acl::explodeACL($acl));
}
$this->roles[$role_id]['description'] = $dsc;
$this->roles[$role_id]['cn'] = $attrs['cn'][0];
$this->roles[$role_id]['cn'] = $attrs['cn'][0];
}
/* Objects */
......@@ -188,23 +188,23 @@ class acl extends plugin
}
/* Fill acl types */
if ($this->isContainer){
$this->aclTypes= array("reset" => _("Reset ACLs"),
"one" => _("One level"),
"base" => _("Current object"),
"sub" => _("Complete subtree"),
"psub" => _("Complete subtree (permanent)"),
"role" => _("Use ACL defined in role"));
if ($this->isContainer) {
$this->aclTypes = array("reset" => _("Reset ACLs"),
"one" => _("One level"),
"base" => _("Current object"),
"sub" => _("Complete subtree"),
"psub" => _("Complete subtree (permanent)"),
"role" => _("Use ACL defined in role"));
} else {
$this->aclTypes= array("base" => _("Current object"),
$this->aclTypes = array("base" => _("Current object"),
"role" => _("Use ACL defined in role"));
}
asort($this->aclTypes);
$this->targets= array("user" => _("Users"), "group" => _("Groups"));
$this->targets = array("user" => _("Users"), "group" => _("Groups"));
asort($this->targets);
/* Finally - we want to get saved... */
$this->is_account= TRUE;
$this->is_account = TRUE;
}
/*!
......@@ -215,40 +215,41 @@ class acl extends plugin
/* Call parent execute */
plugin::execute();
$tmp= session::global_get('plist');
$plist= $tmp->info;
$tmp = session::global_get('plist');
$plist = $tmp->info;
/* Handle posts */
if (isset($_POST['new_acl'])){
$this->dialogState= 'create';
$this->dialog= TRUE;
$this->currentIndex= count($this->gosaAclEntry);
if (isset($_POST['new_acl'])) {
$this->dialogState = 'create';
$this->dialog = TRUE;
$this->currentIndex = count($this->gosaAclEntry);
$this->loadAclEntry(TRUE);
}
$new_acl= array();
$aclDialog= FALSE;
$firstedit= FALSE;
$new_acl = array();
$aclDialog = FALSE;
$firstedit = FALSE;
/* Act on HTML post and gets here.
*/
if(isset($_GET['id']) && isset($_GET['act']) && $_GET['act'] == "edit"){
if (isset($_GET['id']) && isset($_GET['act']) && $_GET['act'] == "edit") {
$id = trim($_GET['id']);
$this->dialogState= 'create';
$firstedit= TRUE;
$this->dialog= TRUE;
$this->currentIndex= $id;
$this->dialogState = 'create';
$firstedit = TRUE;
$this->dialog = TRUE;
$this->currentIndex = $id;
$this->loadAclEntry();
}
foreach($_POST as $name => $post){
foreach ($_POST as $name => $post) {
/* Actions... */
if (preg_match('/^acl_edit_.*_x/', $name)){
$this->dialogState= 'create';
$firstedit= TRUE;
$this->dialog= TRUE;
$this->currentIndex= preg_replace('/^acl_edit_([0-9]+).*$/', '\1', $name);
if (preg_match('/^acl_edit_.*_x/', $name)) {
$this->dialogState = 'create';
$firstedit = TRUE;
$this->dialog = TRUE;
$this->currentIndex = preg_replace('/^acl_edit_([0-9]+).*$/', '\1', $name);
$this->loadAclEntry();
continue;
}
......@@ -265,16 +266,16 @@ class acl extends plugin
}
/* Only handle posts, if we allowed to modify ACLs */
if(!$this->acl_is_writeable("")){
if (!$this->acl_is_writeable("")) {
continue;
}
if (preg_match('/^acl_del_.*_x/', $name)){
if (preg_match('/^acl_del_.*_x/', $name)) {
unset($this->gosaAclEntry[preg_replace('/^acl_del_([0-9]+).*$/', '\1', $name)]);
continue;
}
if (preg_match('/^cat_del_.*_x/', $name)){
if (preg_match('/^cat_del_.*_x/', $name)) {
$idx = preg_replace('/^cat_del_([^_]+)_.*$/', '\1', $name);
foreach ($this->config->data['CATEGORIES'][$idx]['classes'] as $key) {
unset($this->aclContents["$idx/$key"]);
......@@ -283,21 +284,23 @@ class acl extends plugin
}
/* Sorting... */
if (preg_match('/^sortup_.*_x/', $name)){
$index= preg_replace('/^sortup_([0-9]+).*$/', '\1', $name);
if ($index > 0){
$tmp= $this->gosaAclEntry[$index];
$this->gosaAclEntry[$index]= $this->gosaAclEntry[$index-1];
$this->gosaAclEntry[$index-1]= $tmp;
if (preg_match('/^sortup_.*_x/', $name)) {
$index = preg_replace('/^sortup_([0-9]+).*$/', '\1', $name);
if ($index > 0) {
$tmp = $this->gosaAclEntry[$index];
$this->gosaAclEntry[$index] = $this->gosaAclEntry[$index - 1];
$this->gosaAclEntry[$index - 1] = $tmp;
}
continue;
}
if (preg_match('/^sortdown_.*_x/', $name)){
$index= preg_replace('/^sortdown_([0-9]+).*$/', '\1', $name);
if ($index < count($this->gosaAclEntry)-1){
$tmp= $this->gosaAclEntry[$index];
$this->gosaAclEntry[$index]= $this->gosaAclEntry[$index+1];
$this->gosaAclEntry[$index+1]= $tmp;
if (preg_match('/^sortdown_.*_x/', $name)) {
$index = preg_replace('/^sortdown_([0-9]+).*$/', '\1', $name);
if ($index < count($this->gosaAclEntry) - 1) {
$tmp = $this->gosaAclEntry[$index];
$this->gosaAclEntry[$index] = $this->gosaAclEntry[$index + 1];
$this->gosaAclEntry[$index + 1] = $tmp;
}
continue;
}
......@@ -314,25 +317,25 @@ class acl extends plugin
}
/* Ordinary ACLs */
if (!isset($new_acl[$object])){
$new_acl[$object]= array();
if (!isset($new_acl[$object])) {
$new_acl[$object] = array();
}
if (isset($new_acl[$object][$attribute])){
$new_acl[$object][$attribute].= $value;
if (isset($new_acl[$object][$attribute])) {
$new_acl[$object][$attribute] .= $value;
} else {
$new_acl[$object][$attribute]= $value;
$new_acl[$object][$attribute] = $value;
}
}
// Remember the selected ACL role.
if(isset($_POST['selected_role']) && $_POST['aclType'] == 'role'){
if (isset($_POST['selected_role']) && $_POST['aclType'] == 'role') {
$this->aclContents = "";
$this->aclContents = base64_decode($_POST['selected_role']);
}
}
if(isset($_POST['acl_dummy_0_0_0'])){
$aclDialog= TRUE;
if (isset($_POST['acl_dummy_0_0_0'])) {
$aclDialog = TRUE;
}
if ($this->acl_is_writeable("")) {
......@@ -342,59 +345,60 @@ class acl extends plugin
foreach ($this->config->data['CATEGORIES'][$this->aclObject]['classes'] as $oc) {
if(isset($this->aclContents[$oc]) && is_array($this->aclContents)){
if (isset($this->aclContents[$oc]) && is_array($this->aclContents)) {
unset($this->aclContents[$oc]);
}elseif(isset($this->aclContents[$this->aclObject.'/'.$oc]) && is_array($this->aclContents)){
} elseif (isset($this->aclContents[$this->aclObject.'/'.$oc]) && is_array($this->aclContents)) {
unset($this->aclContents[$this->aclObject.'/'.$oc]);
}else{
# trigger_error("Huhm?");
} else {
//trigger_error("Huhm?");
}
if (isset($new_acl[$oc]) && is_array($new_acl)){
$this->aclContents[$oc]= $new_acl[$oc];
if (isset($new_acl[$oc]) && is_array($new_acl)) {
$this->aclContents[$oc] = $new_acl[$oc];
}
if (isset($new_acl[$this->aclObject.'/'.$oc]) && is_array($new_acl)){
$this->aclContents[$this->aclObject.'/'.$oc]= $new_acl[$this->aclObject.'/'.$oc];
if (isset($new_acl[$this->aclObject.'/'.$oc]) && is_array($new_acl)) {
$this->aclContents[$this->aclObject.'/'.$oc] = $new_acl[$this->aclObject.'/'.$oc];
}
}
}
/* Save new acl in case of base edit mode */
if ($this->aclType == 'base' && !$firstedit){
$this->aclContents= $new_acl;
if ($this->aclType == 'base' && !$firstedit) {
$this->aclContents = $new_acl;
}
}
/* Cancel new acl? */
if (isset($_POST['cancel_new_acl'])){
$this->dialogState= 'head';
$this->dialog= FALSE;
if ($this->wasNewEntry){
unset ($this->gosaAclEntry[$this->currentIndex]);
if (isset($_POST['cancel_new_acl'])) {
$this->dialogState = 'head';
$this->dialog = FALSE;
if ($this->wasNewEntry) {
unset($this->gosaAclEntry[$this->currentIndex]);
}
}
/* Save common values */
if($this->acl_is_writeable("")){
foreach (array("aclType","aclFilter", "aclObject", "target") as $key){
if (isset($_POST[$key])){
$this->$key= validate($_POST[$key]);
if ($this->acl_is_writeable("")) {
foreach (array("aclType","aclFilter", "aclObject", "target") as $key) {
if (isset($_POST[$key])) {
$this->$key = validate($_POST[$key]);
}
}
}
/* Store ACL in main object? */
if (isset($_POST['submit_new_acl'])){
$this->gosaAclEntry[$this->currentIndex]['type']= $this->aclType;
$this->gosaAclEntry[$this->currentIndex]['members']= $this->recipients;
$this->gosaAclEntry[$this->currentIndex]['acl']= $this->aclContents;
$this->gosaAclEntry[$this->currentIndex]['filter']= $this->aclFilter;
$this->dialogState= 'head';
$this->dialog= FALSE;
if (isset($_POST['submit_new_acl'])) {
$this->gosaAclEntry[$this->currentIndex]['type'] = $this->aclType;
$this->gosaAclEntry[$this->currentIndex]['members'] = $this->recipients;
$this->gosaAclEntry[$this->currentIndex]['acl'] = $this->aclContents;
$this->gosaAclEntry[$this->currentIndex]['filter'] = $this->aclFilter;
$this->dialogState = 'head';
$this->dialog = FALSE;
}
/* Cancel edit acl? */
if (isset($_POST['cancel_edit_acl'])){
$this->dialogState= 'create';
if (isset($_POST['cancel_edit_acl'])) {
$this->dialogState = 'create';
foreach ($this->config->data['CATEGORIES'][$this->aclObject]['classes'] as $oc) {
if (isset($this->savedAclContents[$oc])) {
$this->aclContents[$oc] = $this->savedAclContents[$oc];
......@@ -432,29 +436,31 @@ class acl extends plugin
}
/* Remove from list? */
if (isset($_POST['del']) && isset($_POST['recipient'])){
foreach ($_POST['recipient'] as $key){
if (isset($_POST['del']) && isset($_POST['recipient'])) {
foreach ($_POST['recipient'] as $key) {
unset($this->recipients[$key]);
}
}
/* Create templating instance */
$smarty= get_smarty();
$smarty->assign("acl_readable",$this->acl_is_readable(""));
if(!$this->acl_is_readable("")){
return ($smarty->fetch (get_template_path('acl.tpl')));
$smarty = get_smarty();
$smarty->assign("acl_readable", $this->acl_is_readable(""));
if (!$this->acl_is_readable("")) {
return $smarty->fetch (get_template_path('acl.tpl'));
}
if ($this->dialogState == 'head') {
/* Draw list */
$aclList= new divSelectBox("aclList");
$aclList = new divSelectBox("aclList");
$aclList->SetHeight(450);
/* Fill in entries */
foreach ($this->gosaAclEntry as $key => $entry) {
if(!$this->acl_is_readable("")) continue;
if (!$this->acl_is_readable("")) {
continue;
}
$action ="";
$action = "";
if ($this->acl_is_readable("")) {
$link = "<a href=?plug=".$_GET['plug']."&amp;id=".$key."&amp;act=edit>".$this->assembleAclSummary($entry)."</a>";
......@@ -462,26 +468,26 @@ class acl extends plugin
$link = $this->assembleAclSummary($entry);
}
$field1= array("html" => $this->aclTypes[$entry['type']], "attach" => "style='width:150px'");
$field2= array("html" => $link);
$field1 = array("html" => $this->aclTypes[$entry['type']], "attach" => "style='width:150px'");
$field2 = array("html" => $link);
if($this->acl_is_writeable("")){
$action.= "<input type='image' name='sortup_$key' alt='up'
if ($this->acl_is_writeable("")) {
$action .= "<input type='image' name='sortup_$key' alt='up'
title='"._("Up")."' src='images/lists/sort-up.png'/>";
$action.= "<input type='image' name='sortdown_$key' alt='down'
$action .= "<input type='image' name='sortdown_$key' alt='down'
title='"._("Down")."' src='images/lists/sort-down.png'/>";
}
if($this->acl_is_readable("")){
$action.= "<input class='center' type='image' src='images/lists/edit.png'
if ($this->acl_is_readable("")) {
$action .= "<input class='center' type='image' src='images/lists/edit.png'
alt='"._("Edit")."' name='acl_edit_$key' title='".msgPool::editButton(_("ACL"))."'>";
}
if($this->acl_is_removeable("")){
$action.= "<input class='center' type='image' src='images/lists/trash.png'
if ($this->acl_is_removeable("")) {
$action .= "<input class='center' type='image' src='images/lists/trash.png'
alt='"._("Delete")."' name='acl_del_$key' title='".msgPool::delButton(_("ACL"))."'>";
}
$field3= array("html" => $action, "attach" => "style='border-right:0px;width:50px;text-align:right;'");
$field3 = array("html" => $action, "attach" => "style='border-right:0px;width:50px;text-align:right;'");
$aclList->AddEntry(array($field1, $field2, $field3));
}
......@@ -490,7 +496,7 @@ class acl extends plugin
if ($this->dialogState == 'create') {
/* Draw list */
$aclList= new divSelectBox("aclList");
$aclList = new divSelectBox("aclList");
$aclList->SetHeight(150);
/* Add settings for all categories to the (permanent) list */
......@@ -513,24 +519,24 @@ class acl extends plugin
/* Set summary... */
if ($summary == "") {
$summary= '<i>'._("No ACL settings for this category!").'</i>';
$summary = '<i>'._("No ACL settings for this category!").'</i>';
} else {
$summary= sprintf(_("Contains ACLs for these objects: %s"), preg_replace('/, $/', '', $summary));
$summary = sprintf(_("Contains ACLs for these objects: %s"), preg_replace('/, $/', '', $summary));
}
$actions ="";
$actions = "";
if ($this->acl_is_readable("")) {
$actions= "<input class='center' type='image' src='images/lists/edit.png'
$actions = "<input class='center' type='image' src='images/lists/edit.png'
alt='"._("Edit")."' name='cat_edit_$section' title='".msgPool::editButton(_("category ACL"))."'>";
}
if ($this->acl_is_removeable()) {
$actions.= "<input class='center' type='image' src='images/lists/trash.png'
$actions .= "<input class='center' type='image' src='images/lists/trash.png'
alt='"._("Delete")."' name='cat_del_$section' title='".msgPool::delButton(_("category ACL"))."'>";
}
$field1= array("html" => $infos['description'], "attach" => "style='width:100px'");
$field2= array("html" => $summary);
$field3= array("html" => $actions, "attach" => "style='border-right:0px;width:50px'");
$field1 = array("html" => $infos['description'], "attach" => "style='width:100px'");
$field2 = array("html" => $summary);
$field3 = array("html" => $actions, "attach" => "style='border-right:0px;width:50px'");
$aclList->AddEntry(array($field1, $field2, $field3));
}
......@@ -543,21 +549,21 @@ class acl extends plugin
/* Assign possible target types */
$smarty->assign("targets", $this->targets);
foreach ($this->attributes as $attr){
foreach ($this->attributes as $attr) {
$smarty->assign($attr, $this->$attr);
}
/* Generate list */
$tmp= array();
$tmp = array();
if ($this->target == "group" && !isset($this->recipients["G:*"])) {
$tmp["G:*"]= _("All users");
$tmp["G:*"] = _("All users");
}
foreach (array("user" => "users", "group" => "groups") as $field => $arr) {
if ($this->target == $field){
foreach ($this->$arr as $key => $value){
if (!isset($this->recipients[$key])){
$tmp[$key]= $value;
if ($this->target == $field) {
foreach ($this->$arr as $key => $value) {
if (!isset($this->recipients[$key])) {
$tmp[$key] = $value;
}
}
}
......@@ -617,16 +623,16 @@ class acl extends plugin
*/
function sort_by_priority($list)
{
$tmp= session::global_get('plist');
$plist= $tmp->info;
$tmp = session::global_get('plist');
$plist = $tmp->info;
asort($plist);
$newSort = array();
foreach($list as $name => $translation){
$na = preg_replace("/^.*\//","",$name);
foreach ($list as $name => $translation) {
$na = preg_replace("/^.*\//", "", $name);
$prio = 0;
if(isset($plist[$na]['plPriority'])){
$prio= $plist[$na]['plPriority'] ;
if (isset($plist[$na]['plPriority'])) {
$prio = $plist[$na]['plPriority'];
}
$newSort[$name] = $prio;
......@@ -635,10 +641,10 @@ class acl extends plugin
asort($newSort);
$ret = array();
foreach($newSort as $name => $prio){
foreach ($newSort as $name => $prio) {
$ret[$name] = $list[$name];
}
return($ret);
return $ret;
}
/*!
......@@ -648,29 +654,29 @@ class acl extends plugin
*/
function buildRoleSelector($list)
{
$D_List =new divSelectBox("Acl_Roles");
$D_List = new divSelectBox("Acl_Roles");
$selected = $this->aclContents;
if(!is_string($this->aclContents) || !isset($list[$this->aclContents])){
if (!is_string($this->aclContents) || !isset($list[$this->aclContents])) {
$selected = key($list);
}
$str ="";
foreach($list as $dn => $values){
$str = "";
foreach ($list as $dn => $values) {
if($dn == $selected){
if ($dn == $selected) {
$option = "<input type='radio' name='selected_role' value='".base64_encode($dn)."' checked>";
}else{
} else {
$option = "<input type='radio' name='selected_role' value='".base64_encode($dn)."'>";
}
$field1 = array("html" => $option) ;
$field2 = array("html" => $values['cn'], "attach" => "style='width:200px;'") ;
$field3 = array("html" => $values['description'],"attach" => "style='border-right:0px;'") ;
$field1 = array("html" => $option);
$field2 = array("html" => $values['cn'], "attach" => "style='width:200px;'");
$field3 = array("html" => $values['description'],"attach" => "style='border-right:0px;'");
$D_List->AddEntry(array($field1,$field2,$field3));
}
return($D_List->DrawList());
return $D_List->DrawList();
}
/*!
......@@ -682,16 +688,16 @@ class acl extends plugin
*/
function buildAclSelector($list)
{
$display= "<input type='hidden' name='acl_dummy_0_0_0' value='1'>";
$cols= 3;
$tmp= session::global_get('plist');
$plist= $tmp->info;
$display = "<input type='hidden' name='acl_dummy_0_0_0' value='1'>";
$cols = 3;
$tmp = session::global_get('plist');
$plist = $tmp->info;
asort($plist);
/* Add select all/none buttons */
$style = "style='width:100px;'";
if($this->acl_is_writeable("")){
if ($this->acl_is_writeable("")) {
$display .= "<input ".$style." type='button' name='toggle_all_create' onClick=\"acl_toggle_all('_0_c$');\" value='Toggle C'>";
$display .= "<input ".$style." type='button' name='toggle_all_move' onClick=\"acl_toggle_all('_0_m$');\" value='Toggle M'>";
$display .= "<input ".$style." type='button' name='toggle_all_remove' onClick=\"acl_toggle_all('_0_d$');\" value='Toggle D'> - ";
......@@ -703,17 +709,17 @@ class acl extends plugin
$display .= "<br>";
$style = "style='width:50px;'";
$display .= "<input ".$style." type='button' name='set_true_all_create' onClick=\"acl_set_all('_0_c$',true);\" value='C+'>";
$display .= "<input ".$style." type='button' name='set_false_all_create' onClick=\"acl_set_all('_0_c$',false);\" value='C-'>";
$display .= "<input ".$style." type='button' name='set_true_all_move' onClick=\"acl_set_all('_0_m$',true);\" value='M+'>";
$display .= "<input ".$style." type='button' name='set_false_all_move' onClick=\"acl_set_all('_0_m$',false);\" value='M-'>";
$display .= "<input ".$style." type='button' name='set_true_all_remove' onClick=\"acl_set_all('_0_d$',true);\" value='D+'>";
$display .= "<input ".$style." type='button' name='set_false_all_remove' onClick=\"acl_set_all('_0_d$',false);\" value='D-'> - ";
$display .= "<input ".$style." type='button' name='set_true_all_read' onClick=\"acl_set_all('_0_r$',true);\" value='R+'>";
$display .= "<input ".$style." type='button' name='set_false_all_read' onClick=\"acl_set_all('_0_r$',false);\" value='R-'>";
$display .= "<input ".$style." type='button' name='set_true_all_write' onClick=\"acl_set_all('_0_w$',true);\" value='W+'>";
$display .= "<input ".$style." type='button' name='set_false_all_write' onClick=\"acl_set_all('_0_w$',false);\" value='W-'> - ";
$style = "style='width:50px;'";
$display .= "<input ".$style." type='button' name='set_true_all_create' onClick=\"acl_set_all('_0_c$',true);\" value='C+'>";
$display .= "<input ".$style." type='button' name='set_false_all_create' onClick=\"acl_set_all('_0_c$',false);\" value='C-'>";
$display .= "<input ".$style." type='button' name='set_true_all_move' onClick=\"acl_set_all('_0_m$',true);\" value='M+'>";
$display .= "<input ".$style." type='button' name='set_false_all_move' onClick=\"acl_set_all('_0_m$',false);\" value='M-'>";
$display .= "<input ".$style." type='button' name='set_true_all_remove' onClick=\"acl_set_all('_0_d$',true);\" value='D+'>";
$display .= "<input ".$style." type='button' name='set_false_all_remove' onClick=\"acl_set_all('_0_d$',false);\" value='D-'> - ";
$display .= "<input ".$style." type='button' name='set_true_all_read' onClick=\"acl_set_all('_0_r$',true);\" value='R+'>";
$display .= "<input ".$style." type='button' name='set_false_all_read' onClick=\"acl_set_all('_0_r$',false);\" value='R-'>";
$display .= "<input ".$style." type='button' name='set_true_all_write' onClick=\"acl_set_all('_0_w$',true);\" value='W+'>";
$display .= "<input ".$style." type='button' name='set_false_all_write' onClick=\"acl_set_all('_0_w$',false);\" value='W-'> - ";
$display .= "<input ".$style." type='button' name='set_true_all_read' onClick=\"acl_set_all('[^0]_r$',true);\" value='R+'>";
$display .= "<input ".$style." type='button' name='set_false_all_read' onClick=\"acl_set_all('[^0]_r$',false);\" value='R-'>";
......@@ -722,23 +728,23 @@ class acl extends plugin
}
/* Build general objects */
$list =$this->sort_by_priority($list);
foreach ($list as $key => $name){
$list = $this->sort_by_priority($list);