Code

Updated printGeneric.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Feb 2008 12:51:10 +0000 (12:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 21 Feb 2008 12:51:10 +0000 (12:51 +0000)
-Only trigger ppd rename if the object wasn't newly created.
-Only trigger ppd remove if the object wasn't newly created.

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

plugins/admin/systems/class_printGeneric.inc
plugins/admin/systems/class_printerPPDDialog.inc

index 9fd41e31bb712854e879d0a4b897ffbea55a2d55..a3a3f34a32a3c694878816caa2007b5a0ec7c8fe 100644 (file)
@@ -721,17 +721,18 @@ 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;
         $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();
index ac3aebc5965d3ace0966d0e82a39d14ff8b9d0d2..cf36067aea6df1c7f85fb229b9c6cd0ec5a1461d 100644 (file)
@@ -491,6 +491,7 @@ class printerPPDDialog extends plugin
   function update_ppd_url()
   {
     $this->SelectPPD("modified/".$this->selectedPPD['link']);
+    return("modified/".$this->selectedPPD['link']);
   }
   
   function check()