summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81d1184)
raw | patch | inline | side by side (parent: 81d1184)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 11 May 2009 10:02:31 +0000 (10:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 11 May 2009 10:02:31 +0000 (10:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13645 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index 88bc20956e3b83dab580e5695caf8715bb8e8009..117f5ee612e8b00c3ff6d3f87c956c5c0414a635 100644 (file)
/* save ppd configuration */
if($this->PPDdialogToSave && is_object($this->PPDdialogToSave)){
$this->PPDdialogToSave->save_ppd();
+
+ /* Rename the generated ppd to match the gzip ending '.gz', if necessary.
+ */
+ $path = $this->config->get_cfg_value("ppdPath");
+ if(!preg_match("/\/$/",$path)){
+ $path = $path."/";
+ }
+ $ppdManager= new ppdManager($path);
+ if($ppdManager->useGzip && !preg_match('/\.gz$/',$this->gotoPrinterPPD)){
+ if(rename($path.$this->gotoPrinterPPD,$path.$this->gotoPrinterPPD.'.gz')){
+ $this->gotoPrinterPPD .= '.gz';
+ }
+ }elseif(!$ppdManager->useGzip && preg_match('/\.gz$/',$this->gotoPrinterPPD)){
+ $new_ppd = preg_replace('/\.gz$/','',$this->gotoPrinterPPD);
+ if(rename($path.$this->gotoPrinterPPD,$path.$new_ppd)){
+ $this->gotoPrinterPPD = $new_ppd;
+ }
+ }
}
if($this->orig_dn != $this->dn){
if(!empty($this->gotoPrinterPPD)) {