Code

Updated Printer PPD saving.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Feb 2008 13:00:07 +0000 (13:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Feb 2008 13:00:07 +0000 (13:00 +0000)
-Renaming works now

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

gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc

index c0223ebebf7a8740ea9234faf623cd40b9fbca2d..d9aa3196c27fc2a023b915bc3243c7667e9fbfc0 100644 (file)
@@ -741,12 +741,12 @@ class printgeneric extends plugin
         $this->PPDdialogToSave = new printerPPDDialog($this->config, $this->dn,$this->gotoPrinterPPD);
         $this->PPDdialogToSave->cn = $this->cn;
         $this->PPDdialogToSave->generateProperties();
-        $this->PPDdialogToSave->update_ppd_url();
+        $this->gotoPrinterPPD = $this->PPDdialogToSave->update_ppd_url();
       }
     }
 
     /* 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();
@@ -760,7 +760,7 @@ class printgeneric extends plugin
     }
 
     /* If no ppd is selected, remove this attribute */
-    if(!empty($this->gotoPrinterPPD)) {
+    if(!empty($this->gotoPrinterPPD) && $this->initially_was_account) {
       $this->gotoPrinterPPD = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/ppd/".$this->gotoPrinterPPD);
     }else{
       $this->gotoPrinterPPD = array();