Code

Avoid initial reset of ocMapping. It is array() anyway.
[gosa.git] / plugins / admin / fai / class_faiPackage.inc
index 26b10f27d88a6b405bb38907d18d02a9cf90a35e..c91282532bf8c2fbeb9251b61fc629022e843f04 100644 (file)
@@ -421,13 +421,15 @@ class faiPackage extends plugin
         $dsc= "";
         if (preg_match('/^-/', $usedName)){
           $dsc= " - "._("Package marked for removal");
-          $usedName= preg_replace('/^-/', '! ', $usedName);
+          $usedName2= preg_replace('/^-/', '! ', $usedName);
+        }else{
+          $usedName2= $usedName;
         }
 
         if(isset($this->list[$usedName][1])){
-          $a_ret[$usedName] = $usedName." [".$this->list[$usedName][1]."]".$c_str.$dsc;
+          $a_ret[$usedName] = $usedName2." [".$this->list[$usedName][1]."]".$c_str.$dsc;
         }else{
-          $a_ret[$usedName] = $usedName.$c_str.$dsc;
+          $a_ret[$usedName] = $usedName2.$c_str.$dsc;
         }
       }
     }
@@ -530,6 +532,27 @@ class faiPackage extends plugin
       }
     }
   }
+
+  /* Return plugin informations for acl handling */ 
+  function plInfo()
+  {
+    return (array( 
+          "plShortName" => _("Package"),
+          "plDescription" => _("FAI Package list"),
+          "plSelfModify"  => FALSE,
+          "plDepends"     => array(),
+          "plPriority"    => 0,
+          "plSection"     => array("administration"),
+          "plCategory"    => array("fai"),
+          "plProvidedAcls" => array(
+            "cn"                => _("Name"),
+            "description"       => _("Description"),
+            "FAIpackage"        => _("Packages"),
+            "FAIdebianSection"  => _("Section"),
+            "FAIinstallMethod"  => _("Install Method"),
+            "FAIdebianRelease"  => _("Release"))
+          ));
+  }
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: