Code

Added printer to terminal acls.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Sep 2006 06:56:59 +0000 (06:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Sep 2006 06:56:59 +0000 (06:56 +0000)
Fixed Unittag error while creating a new printer

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4831 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc

index 4f33ca2cd3e1d62ed2eacd4c62d9faf44ec0ea7c..c28f712c9ededc5af00bd8ea43293adf660d7feb 100644 (file)
@@ -779,16 +779,16 @@ class printgeneric extends plugin
       $this->attrs['gotoGroupAdminPrinter'][]=$mem['cn'][0];
     }
 
-    if(($this->gosaUnitTag) && (!in_array_ics("gosaAdministrativeUnitTag",$this->attrs['objectClass']))){
-      $this->attrs['objectClass'][] = "gosaAdministrativeUnitTag";
-    }
-
     if($this->orig_dn == 'new'){
       foreach(array("gotoGroupPrinter","gotoUserAdminPrinter","gotoGroupAdminPrinter","gotoUserPrinter") as $checkVar){
         if(count($this->attrs[$checkVar])  == 0 || empty($this->attrs[$checkVar])){
           unset($this->attrs[$checkVar]);
         }
       }
+    }else{
+      if(($this->gosaUnitTag) && (!in_array_ics("gosaAdministrativeUnitTag",$this->attrs['objectClass']))){
+        $this->attrs['objectClass'][] = "gosaAdministrativeUnitTag";
+      }
     }
 
     /* Move object in necessary*/
@@ -858,7 +858,7 @@ class printgeneric extends plugin
           "plPriority"    => 11,
           "plSection"     => array("administration"),
           "plCategory"    => array("printer" => array("description"  => _("Printer"),
-                                                    "objectClass"  => "gotoPrinter"),"workstation"),
+                                                    "objectClass"  => "gotoPrinter"),"workstation","terminal"),
           "plProvidedAcls"=> array(
             "cn"                => _("Name"),
             "base"                => _("Base") ,