Code

Updated Enviroment->Printer settings
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 Apr 2008 12:10:25 +0000 (12:10 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 Apr 2008 12:10:25 +0000 (12:10 +0000)
-Printer assignements were not removed, if the printer was in a different department.

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

gosa-plugins/goto/personal/environment/class_environment.inc

index 292fc578883deb1484b7d62f41432b5221e65bfa..0c2356ebaada70912f631ef33951eb4672c37bd0 100644 (file)
@@ -1173,6 +1173,7 @@ class environment extends plugin
       }
 
       /* Remove old entries */
+      $ldap->cd($this->config->current['BASE']);;
       $ldap->search("(&(objectClass=gotoPrinter)(goto".$s_suffix."Printer=".$this->$useVar."))",array("*"));
       while($attr = $ldap->fetch()){
         $printerObj = NULL;
@@ -1182,6 +1183,7 @@ class environment extends plugin
         $printerObj->by_object['printgeneric']->save();
       }
 
+      $ldap->cd($this->config->current['BASE']);;
       $ldap->search("(&(objectClass=gotoPrinter)(goto".$s_suffix."AdminPrinter=".$this->$useVar."))",array("*"));
       while($attr = $ldap->fetch()){
         $printerObj = NULL;