Code

Updated printGeneric
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Feb 2008 10:53:54 +0000 (10:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Feb 2008 10:53:54 +0000 (10:53 +0000)
-Fixed saving of ppds

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

plugins/admin/systems/class_printGeneric.inc

index af25e10e8c6b24c9fc1da532cef38e8c47cb6c18..86d22bab1aa7eea94d09791dcb341f84c45a2680 100644 (file)
@@ -721,7 +721,7 @@ class printgeneric extends plugin
     if($this->PPDdialogToSave){
       $this->PPDdialogToSave->save_ppd();
     }
-    if($this->orig_dn != $this->dn){
+    if($this->orig_dn != $this->dn && $this->initially_was_account){
       if(!empty($this->gotoPrinterPPD)) {
         $this->PPDdialogToSave = new printerPPDDialog($this->config, $this->dn,$this->gotoPrinterPPD);
         $this->PPDdialogToSave->cn = $this->cn;
@@ -731,7 +731,7 @@ class printgeneric extends plugin
     }
 
     /* Remove previously selected ppd file.*/
-    if($this->initial_PPD != $this->gotoPrinterPPD){
+    if($this->initial_PPD != $this->gotoPrinterPPD && $this->initially_was_account){
       if(!empty($this->initial_PPD)){
         $tmp = new printerPPDDialog($this->config, $this->dn,$this->initial_PPD);
         $tmp->removeModifiedPPD();