From 4e4810f5d7bdfbf8442327b846c298f67785177a Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 17 Mar 2010 10:17:36 +0000 Subject: [PATCH] Updated images in class_acl.inc git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16739 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_acl.inc | 47 +++++++++++++++------------------ 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/gosa-core/include/class_acl.inc b/gosa-core/include/class_acl.inc index 48c913c09..c10c3fa40 100644 --- a/gosa-core/include/class_acl.inc +++ b/gosa-core/include/class_acl.inc @@ -272,17 +272,17 @@ class acl extends plugin 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])){ @@ -297,22 +297,25 @@ class acl extends plugin 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]; @@ -320,8 +323,8 @@ class acl extends plugin } 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]; @@ -492,19 +495,15 @@ class acl extends plugin $field2= array("string" => $link); if($this->acl_is_writeable("")){ - $action.= ""; - $action.= ""; + $action.= image('images/lists/sort-up.png', 'sortup_'.$key); + $action.= image('images/lists/sort-down.png', 'sortdown_'.$key); } if($this->acl_is_readable("")){ - $action.= ""; + $action.= image('images/lists/edit.png','acl_edit_'.$key,msgPool::editButton(_("ACL"))); } if($this->acl_is_removeable("")){ - $action.= ""; + $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;'"); @@ -547,12 +546,10 @@ class acl extends plugin $actions =""; if($this->acl_is_readable("")){ - $actions= ""; + $actions.= image('images/lists/edit.png','cat_edit_'.$section, msgPool::editButton(_("category ACL"))); } if($this->acl_is_removeable()){ - $actions.= ""; + $actions.= image('images/lists/trash.png','cat_del_'.$section, msgPool::delButton(_("category ACL"))); } $field1= array("string" => $dsc, "attach" => "style='width:100px'"); -- 2.30.2