From: hickert Date: Fri, 12 Oct 2007 11:47:41 +0000 (+0000) Subject: Updated printer ppd saving X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ea638e7297c2d312a4017456c22ebff4e6d10865;p=gosa.git Updated printer ppd saving git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7535 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 18b1ba025..55407a07e 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -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){ diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc index 11545d4b4..ebcb2efdb 100644 --- a/plugins/admin/systems/class_printerPPDDialog.inc +++ b/plugins/admin/systems/class_printerPPDDialog.inc @@ -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() {