Code

Fixed actions
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 May 2008 13:05:41 +0000 (13:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 May 2008 13:05:41 +0000 (13:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11041 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_divListFai.inc

index 29b54840df8d16c29c08580d9fba963d0dd42fce..02f00d44cdbe9d8be8ca77cc3ba76379f7fdabce 100644 (file)
@@ -140,8 +140,8 @@ class divListFai extends MultiSelectWindow
           array("images/fai_new_script.png"         , _("Scripts")          ,"Create_script"    , _("S")  , "faiScript"),
           array("images/fai_new_hook.png"           , _("Hooks")            ,"Create_hook"      , _("H")  , "faiHook"),
           array("images/fai_new_variable.png"       , _("Variables")        ,"Create_variable"  , _("V")  , "faiVariable"),
-        array("images/fai_new_template.png"       , _("Templates ")       ,"Create_template"  , _("I")  , "faiTemplate"),
-        array("images/fai_new_packages.png"       , _("Package list")     ,"Create_package"   , _("PK") , "faiPackage"));
+          array("images/fai_new_template.png"       , _("Templates ")       ,"Create_template"  , _("I")  , "faiTemplate"),
+          array("images/fai_new_packages.png"       , _("Package list")     ,"Create_package"   , _("PK") , "faiPackage"));
 
       foreach($arr as $ar){
         $acl = $ui->get_permissions($this->parent->fai_base,"fai/".$ar[4]);
@@ -156,8 +156,8 @@ class divListFai extends MultiSelectWindow
     $s.= "..|<img src='images/lists/trash.png' alt='' border='0' class='center'>".
       "&nbsp;"._("Remove")."|"."remove_multiple|\n";
 
-    /* Add multiple copy & cut icons */
-    if(is_object($this->parent->CopyPasteHandler)){
+
+    if(is_object($this->parent->CopyPasteHandler) && preg_match("/r/",$acl_all)){
       $s.= "..|---|\n";
       $s.= "..|<img src='images/lists/copy.png' alt='' border='0' class='center'>".
         "&nbsp;"._("Copy")."|"."multiple_copy_systems|\n";
@@ -255,7 +255,7 @@ class divListFai extends MultiSelectWindow
        $ui = get_userinfo();
        $action ="";
        $acl_all = $ui->has_complete_category_acls($this->parent->fai_base,$this->module);
-       if(preg_match("/(c.*w|w.*c)/",$acl_all) && $this->parent->CopyPasteHandler){
+       if(preg_match("/r/",$acl_all) && $this->parent->CopyPasteHandler){
          $action .= "<input class='center' type='image'
            src='images/lists/copy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'>&nbsp;";
        }