diff --git a/include/class_acl.inc b/include/class_acl.inc
index a3a169a06e8685555823cbd6b80a26dd014c64c0..2d9e72501b28b2e872d42c82deb8037d9d12a181 100644 (file)
--- a/include/class_acl.inc
+++ b/include/class_acl.inc
var $wasNewEntry= FALSE;
var $ocMapping= array();
var $savedAclContents= array();
-
+ var $myAclObjects = array();
function acl ($config, $parent, $dn= NULL)
{
$new_acl= array();
$aclDialog= FALSE;
+ $firstedit= FALSE;
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);
$this->loadAclEntry();
}
/* Only be interested in new acl's, if we're in the right _POST place */
- if ($aclDialog && is_array($this->ocMapping[$this->aclObject])){
+ if ($aclDialog && $this->aclObject != "" && is_array($this->ocMapping[$this->aclObject])){
foreach ($this->ocMapping[$this->aclObject] as $oc){
unset($this->aclContents[$oc]);
}
/* Save new acl in case of base edit mode */
- if ($this->aclType == 'base'){
+ if ($this->aclType == 'base' && !$firstedit){
$this->aclContents= $new_acl;
}
$tmp= get_global('plist');
$plist= $tmp->info;
asort($plist);
+ $newSort = array();
foreach($list as $name => $translation){
$na = preg_replace("/^.*\//","",$name);
- $prio= $plist[$na]['plPriority'] ;
+ $prio = 0;
+ if(isset($plist[$na]['plPriority'])){
+ $prio= $plist[$na]['plPriority'] ;
+ }
$newSort[$name] = $prio;
}
$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-'>";
- /* Build general objects */
+ /* Build general objects */
$list =$this->sort_by_priority($list);
foreach ($list as $key => $name){
$display.= "\n <tr>".
"\n <td style='background-color:#E0E0E0' colspan=".($cols-1).">$options</td>".
- "\n <td style='background-color:#D4D4D4'> ".("Complete object:")." $more_options</td>".
+ "\n <td style='background-color:#D4D4D4'> "._("Complete object").": $more_options</td>".
"\n </tr>";
/* Walk through the list of attributes */