Code

Updated printer ppd saving
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Oct 2007 11:47:41 +0000 (11:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Oct 2007 11:47:41 +0000 (11:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7535 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 18b1ba0251dc7fd8fc25280aa26086073cb0dfc8..55407a07e67f953d82e6de0dc5bc2be5430f3797 100644 (file)
@@ -730,6 +730,12 @@ class printgeneric extends plugin
     if($this->PPDdialogToSave && is_object($this->PPDdialogToSave)){
       $this->PPDdialogToSave->save_ppd();
     }
+    if($this->orig_dn != $this->dn){
+      $this->PPDdialogToSave = new printerPPDDialog($this->config, $this->dn,$this->gotoPrinterPPD);
+      $this->PPDdialogToSave->cn = $this->cn;
+      $this->PPDdialogToSave->generateProperties();
+      $this->PPDdialogToSave->update_ppd_url();
+    }
 
     /* Remove previously selected ppd file.*/
     if($this->initial_PPD != $this->gotoPrinterPPD){
index 11545d4b4c83dc730267b24a0537e938236506d6..ebcb2efdb6d2893381cf8ac8db92ada05fa1e891 100644 (file)
@@ -352,7 +352,8 @@ class printerPPDDialog extends plugin
 
 
   /* Save modified ppd */
-  function save_ppd(){
+  function save_ppd()
+  {
     if($this->ppdManager){
       $this->ppdManager->saveProperties($this->pathToPPD.$this->pathToModified.$this->selectedPPD['link'],$this->ppdConfig);
     }
@@ -498,6 +499,11 @@ class printerPPDDialog extends plugin
       print_red(sprintf(_("Removing old ppd file '%s' failed. File does not exists or is not accessible."),$path));
     }
   }
+
+  function update_ppd_url()
+  {
+    $this->SelectPPD("modified/".$this->selectedPPD['link']);
+  }
   
   function check()
   {