Code

Fixed PPD upload
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Nov 2005 11:43:59 +0000 (11:43 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Nov 2005 11:43:59 +0000 (11:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1938 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printerPPDDialog.inc

index 8515a1b49b89f990fb3d044991af793485b4689f..ab1b175258e6315454fa753bd165a1708bb059ee 100644 (file)
@@ -136,6 +136,7 @@ class printerPPDDialog extends plugin
                 }
               }// Foreach
               if(!$found){
+                $ppdname = $vendor."/".$vendor."-".preg_replace("/^[^ ]/","",str_replace("-","",$model)).".ppd";
                 $filename = $this->pathToPPD.$vendor."/".$vendor."-".preg_replace("/^[^ ]/","",str_replace("-","",$model)).".ppd";
                 $fp = @fopen($filename,"w+");
                 if(!$fp){
@@ -147,8 +148,11 @@ class printerPPDDialog extends plugin
 
                   $tmp2= split("\n", $res);
                   $tmp3['name']   =preg_replace("/^ -/","",$tmp2[1]);
-                  $tmp3['link']   =$filename;
+                  $tmp3['link']   =$ppdname;
                   $tmp3['ppd']    =$res;
+
+                  print_a($tmp3);
+
                   $this->selectedPPD = $tmp3;
                   $this->getPrinterReload(); 
                 }