summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 541b4d8)
raw | patch | inline | side by side (parent: 541b4d8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 Jun 2009 11:17:51 +0000 (11:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 Jun 2009 11:17:51 +0000 (11:17 +0000) |
-Special chars broke the upload process.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13845 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13845 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc b/gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc
index be43f441ad5ef534615ef5e9894986012ed2343a..3da4d8548209d56b238c4d91e68cff84d9837b15 100644 (file)
/* Get Description from ppd, & parse out some informations */
$ppdDesc = @$this->ppdManager->loadDescription($_PathOnHdd);
if($ppdDesc){
- $name = $ppdDesc['name'];
+ $name = preg_replace("/\//","-",$ppdDesc['name']);
$vendor = $ppdDesc['manufacturer'];
$model = $ppdDesc['model'];
}
/* Check if this ppd already exists */
$found = false;
+
foreach($this->ppdList[$vendor] as $key => $val){
- if(preg_match("/".$model.".*/i",$key)){
+ if(preg_match("/".preg_quote($model,'/').".*/i",$key)){
$found = true;
if(!$overwrite){
if(!copy($_PathOnHdd,$_PathOnHdd."_back")){
/* Sort all available files, and create header (Vendor index) */
foreach($tmp as $file=>$ppd){
- if(preg_match("#".$this->pathToModified."#",$file)) continue;
+ if(preg_match("#".preg_quote($this->pathToModified,'#')."#",$file)) continue;
if(!isset($this->ppdListHeader[$ppd['manufacturer']])){
$this->ppdListHeader[$ppd['manufacturer']]=0;