Code

Udpated printer ppd saving.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Oct 2007 07:18:11 +0000 (07:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Oct 2007 07:18:11 +0000 (07:18 +0000)
replace all not printable characters of ppd name with _ .

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

plugins/admin/systems/class_printerPPDDialog.inc

index e7073aa16e247f6144b4f24fd2df66a8d5a79d7c..6a9c37df63c2872f1e1331a823f0a2f58b6c4ccb 100644 (file)
@@ -189,7 +189,7 @@ class printerPPDDialog extends plugin
       $Model  = trim(preg_replace("/".$Vendor."/","",$Name));
     }    
 
-    $PrinterName  = $this->cn."-".$Name
+    $PrinterName  = $this->cn."-".preg_replace("/[^a-z0-9-_\.]/i","_",$Name)
     $PPDName      = $Vendor."/".$PrinterName.".ppd";
     
     /* Create the vendors path, if it doesn't exists already */