Code

Replace all not printerable chars with _
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Oct 2007 07:19:19 +0000 (07:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Oct 2007 07:19:19 +0000 (07:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7528 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printerPPDDialog.inc

index f8b4433aaedc4f3cdfc3025c888bb84b0f7ee797..11545d4b4c83dc730267b24a0537e938236506d6 100644 (file)
@@ -192,7 +192,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 */