summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5d994a9)
raw | patch | inline | side by side (parent: 5d994a9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Mar 2010 10:17:36 +0000 (10:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Mar 2010 10:17:36 +0000 (10:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16739 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_acl.inc | patch | blob | history |
index 48c913c09216d960002e09b18156fbb0abbc985c..c10c3fa409ffa25647302602d69639accc98ae73 100644 (file)
foreach($_POST as $name => $post){
/* Actions... */
- if (preg_match('/^acl_edit_.*_x/', $name)){
+ if (preg_match('/^acl_edit_[0-9]*$/', $name)){
$this->dialogState= 'create';
$firstedit= TRUE;
$this->dialog= TRUE;
- $this->currentIndex= preg_replace('/^acl_edit_([0-9]+).*$/', '\1', $name);
+ $this->currentIndex= preg_replace('/^acl_edit_([0-9]*)$/', '\1', $name);
$this->loadAclEntry();
continue;
}
- if (preg_match('/^cat_edit_.*_x/', $name)){
- $this->aclObject= preg_replace('/^cat_edit_([^_]+)_.*$/', '\1', $name);
+ if (preg_match('/^cat_edit_.*$/', $name)){
+ $this->aclObject= preg_replace('/^cat_edit_(.*)$/', '\1', $name);
$this->dialogState= 'edit';
foreach ($this->ocMapping[$this->aclObject] as $oc){
if (isset($this->aclContents[$oc])){
continue;
}
- if (preg_match('/^acl_del_.*_x/', $name)){
- unset($this->gosaAclEntry[preg_replace('/^acl_del_([0-9]+).*$/', '\1', $name)]);
+ if (preg_match('/^acl_del_[0-9]*$/', $name)){
+ unset($this->gosaAclEntry[preg_replace('/^acl_del_([0-9]*)$/', '\1', $name)]);
continue;
}
- if (preg_match('/^cat_del_.*_x/', $name)){
- $idx= preg_replace('/^cat_del_([^_]+)_.*$/', '\1', $name);
+ if (preg_match('/^cat_del_.*$/', $name)){
+ $idx= preg_replace('/^cat_del_(.*)$/', '\1', $name);
foreach ($this->ocMapping[$idx] as $key){
- unset($this->aclContents["$idx/$key"]);
+ if(isset($this->aclContents[$idx]))
+ unset($this->aclContents[$idx]);
+ if(isset($this->aclContents["$idx/$key"]))
+ unset($this->aclContents["$idx/$key"]);
}
continue;
}
/* Sorting... */
- if (preg_match('/^sortup_.*_x/', $name)){
- $index= preg_replace('/^sortup_([0-9]+).*$/', '\1', $name);
+ if (preg_match('/^sortup_[0-9]*$/', $name)){
+ $index= preg_replace('/^sortup_([0-9]*)$/', '\1', $name);
if ($index > 0){
$tmp= $this->gosaAclEntry[$index];
$this->gosaAclEntry[$index]= $this->gosaAclEntry[$index-1];
}
continue;
}
- if (preg_match('/^sortdown_.*_x/', $name)){
- $index= preg_replace('/^sortdown_([0-9]+).*$/', '\1', $name);
+ if (preg_match('/^sortdown_[0-9]*$/', $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];
$field2= array("string" => $link);
if($this->acl_is_writeable("")){
- $action.= "<input type='image' name='sortup_$key' alt='up'
- title='"._("Up")."' src='images/lists/sort-up.png' align='top'>";
- $action.= "<input type='image' name='sortdown_$key' alt='down'
- title='"._("Down")."' src='images/lists/sort-down.png'>";
+ $action.= image('images/lists/sort-up.png', 'sortup_'.$key);
+ $action.= image('images/lists/sort-down.png', 'sortdown_'.$key);
}
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"))."'>";
+ $action.= image('images/lists/edit.png','acl_edit_'.$key,msgPool::editButton(_("ACL")));
}
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"))."'>";
+ $action.= image('images/lists/trash.png','acl_del_'.$key,msgPool::delButton(_("ACL")));
}
$field3= array("string" => $action, "attach" => "style='border-right:0px;width:50px;text-align:right;'");
$actions ="";
if($this->acl_is_readable("")){
- $actions= "<input class='center' type='image' src='images/lists/edit.png'
- alt='"._("Edit")."' name='cat_edit_$section' title='".msgPool::editButton(_("category ACL"))."'>";
+ $actions.= image('images/lists/edit.png','cat_edit_'.$section, msgPool::editButton(_("category ACL")));
}
if($this->acl_is_removeable()){
- $actions.= "<input class='center' type='image' src='images/lists/trash.png'
- alt='"._("Delete")."' name='cat_del_$section' title='".msgPool::delButton(_("category ACL"))."'>";
+ $actions.= image('images/lists/trash.png','cat_del_'.$section, msgPool::delButton(_("category ACL")));
}
$field1= array("string" => $dsc, "attach" => "style='width:100px'");