diff --git a/include/class_acl.inc b/include/class_acl.inc
index 8103ba16e8e4a756dfbf215a447f9113d656eeef..f3fed5371fa5cb4c5be52d753228c1f99e93d815 100644 (file)
--- a/include/class_acl.inc
+++ b/include/class_acl.inc
var $currentIndex= 0;
var $wasNewEntry= FALSE;
var $ocMapping= array();
- var $multiClass= array();
var $savedAclContents= array();
/* Only feed categories */
if (isset($acls['plCategory'])){
- /* Find multi homed classes */
- if (count($acls['plCategory']) > 1){
- $this->multiClass[$class]= $class;
- }
-
/* Walk through supplied list and feed only translated categories */
foreach($acls['plCategory'] as $idx => $data){
if (is_array($data['objectClass'])){
foreach($data['objectClass'] as $objectClass){
if (in_array_ics($objectClass, $oc)){
- if (isset($this->multiClass[$class])){
- $this->myAclObjects[$idx.'/'.$class]= $acls['plDescription'];
- } else {
- $this->myAclObjects[$class]= $acls['plDescription'];
- }
+ $this->myAclObjects[$idx.'/'.$class]= $acls['plDescription'];
break;
}
}
} else {
if (in_array_ics($data['objectClass'], $oc)){
- if (isset($this->multiClass[$class])){
- $this->myAclObjects[$idx.'/'.$class]= $acls['plDescription'];
- } else {
- $this->myAclObjects[$class]= $acls['plDescription'];
- }
+ $this->myAclObjects[$idx.'/'.$class]= $acls['plDescription'];
}
}
}
}
}
}
+ $this->aclObjects['all']= '* '._("All categories");
+ $this->ocMapping['all']= array('0' => 'all');
/* Sort categories */
asort($this->aclObjects);
$smarty->assign('headline', sprintf(_("Edit ACL for '%s', scope is '%s'"), $this->aclObjects[$this->aclObject], $this->aclTypes[$this->aclType]));
/* Collect objects for selected category */
- $aclObjects= array();
foreach ($this->ocMapping[$this->aclObject] as $idx => $class){
if ($idx == 0){
continue;
}
- if (isset($this->multiClass[$class])){
- $aclObjects[$this->aclObject.'/'.$class]= $plist[$class]['plDescription'];
- } else {
- $aclObjects[$class]= $plist[$class]['plDescription'];
- }
+ $aclObjects[$this->aclObject.'/'.$class]= $plist[$class]['plDescription'];
+ }
+ if ($this->aclObject == 'all'){
+ $aclObjects['all']= _("All objects in current subtree");
}
$smarty->assign('aclSelector', $this->buildAclSelector($aclObjects));
}
$currentAcl= $this->aclContents[$key];
/* Object header */
- $display.= "<table style='width:100%;border:1px solid #A0A0A0' cellspacing=0 cellpadding=2><tr><td style='background-color:#C8C8C8;height:1.8em' colspan=$cols><b>"._("Object").": $name</b></td></tr>";
+ if($_SESSION['js']) {
+ if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/firefox/i",$_SERVER['HTTP_USER_AGENT'])) {
+ $display.= "<table style='width:100%;border:1px solid #A0A0A0' cellspacing=0 cellpadding=2><tr><td style='background-color:#C8C8C8;height:1.8em;' colspan=".($cols-1)."><b>"._("Object").": $name</b></td><td align='right' style='background-color:#C8C8C8;height:1.8em;'><input type='button' onclick='divtoggle(\"$name\");' value='"._("Show/Hide Advanced Settings")."' /></td></tr>";
+ } else {
+ $display.= "<table style='width:100%;border:1px solid #A0A0A0' cellspacing=0 cellpadding=2><tr><td style='background-color:#C8C8C8;height:1.8em;' colspan=$cols><b>"._("Object").": $name</b></td></tr>";
+ }
+ } else {
+ $display.= "<table style='width:100%;border:1px solid #A0A0A0' cellspacing=0 cellpadding=2><tr><td style='background-color:#C8C8C8;height:1.8em;' colspan=$cols><b>"._("Object").": $name</b></td></tr>";
+ }
/* Generate options */
$spc= " ";
$cnt= 1;
$splist= $plist[preg_replace('%^.*/%', '', $key)]['plProvidedAcls'];
asort($splist);
+ if($_SESSION['js']) {
+ if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/firefox/i",$_SERVER['HTTP_USER_AGENT'])) {
+ $display.= "<tr id='tr_$name' style='vertical-align:top;height:0px;'><td colspan=".$cols."><div id='$name' style='visibility:hidden;height:0px;vertical-align:top;width:100%;'><table style='width:100%;'>";
+ }
+ }
foreach($splist as $attr => $dsc){
/* Skip pl* attributes, they are internal... */
$display.= str_repeat("<td style='border-top:1px solid #A0A0A0; width:".(int)(100/$cols)."%'> </td>", $cols-$cnt);
}
- $display.= "</table><br>";
+ if($_SESSION['js']) {
+ if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/firefox/i",$_SERVER['HTTP_USER_AGENT'])) {
+ $display.= "</table></div></td></tr>";
+ }
+ }
+
+ $display.= "</table><br />";
}
return ($display);