Code

Fixed removing of members.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Jul 2006 10:56:46 +0000 (10:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 Jul 2006 10:56:46 +0000 (10:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4234 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc

index 2f1ccd595bf2611f4d980746ddf001856b322a7b..6363daca18b29aeefbe01344865b3c490013c997 100644 (file)
@@ -28,7 +28,6 @@ class printgeneric extends plugin
   var $AdminMembers     =array();
   var $AdminMemberKeys  =array();
 
-  var $gotoUserPrinter ;
   var $PPDdialogToSave  = NULL;
   var $BelongsTo        = "unknown"; //  Specifies if this is a standalone printer, or belongs to a terminal / WS
 
@@ -40,8 +39,14 @@ class printgeneric extends plugin
   var $baseSelection    = false;
   var $macAddress       = "";
 
+  var $gotoUserAdminPrinter;
+  var $gotoGroupAdminPrinter ;
+  var $gotoGroupPrinter;
+  var $gotoUserPrinter ;
+
   /* attribute list for save action */
-  var $attributes     = array("cn", "description", "l", "labeledURI", "gotoPrinterPPD","gotoUserPrinter", "macAddress");
+  var $attributes     = array("cn", "description", "l", "labeledURI", "gotoPrinterPPD","gotoUserPrinter", "macAddress", 
+                              "gotoUserAdminPrinter","gotoGroupAdminPrinter","gotoUserPrinter","gotoGroupPrinter");
   var $objectclasses  = array("top", "gotoPrinter");
 
   function printgeneric ($config, $dn= NULL,$parent = NULL)
@@ -674,32 +679,33 @@ class printgeneric extends plugin
     }else{
       $method="http://";
     }
-  
     $this->attrs['gotoPrinterPPD'] = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/ppd/".$this->gotoPrinterPPD);
 
     /* Append printer user 
      */
-    if((isset($this->attrs['gotoUserPrinter'])) && (is_string($this->attrs['gotoUserPrinter']))){
-      $this->attrs['gotoUserPrinter']=array();
-    }
+    $this->attrs['gotoUserPrinter']=array();
     foreach($this->member['AddUser'] as $mem){
       $this->attrs['gotoUserPrinter'][]=$mem['uid'][0];
     }
 
     /* Append printer group 
      */
+    $this->attrs['gotoGroupPrinter'] = array();
     foreach($this->member['AddGroup'] as $mem){
       $this->attrs['gotoGroupPrinter'][]=$mem['cn'][0];
     }
 
     /* Append printer admin user 
      */
+    $this->attrs['gotoUserAdminPrinter'] = array();
     foreach($this->member['AddAdminUser'] as $mem){
       $this->attrs['gotoUserAdminPrinter'][]=$mem['uid'][0];
     }
 
     /* Append printer admin group 
      */
+    $this->attrs['gotoGroupAdminPrinter']= array();
     foreach($this->member['AddAdminGroup'] as $mem){
       $this->attrs['gotoGroupAdminPrinter'][]=$mem['cn'][0];
     }
@@ -708,6 +714,7 @@ class printgeneric extends plugin
       $this->attrs['objectClass'][] = "gosaAdministrativeUnitTag";
     }
 
+
     /* Write back to ldap */
     $ldap= $this->config->get_ldap_link();
     if ($this->orig_dn == 'new'){