Code

Fixed PPD upload if vendor directory wasn't created.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Nov 2007 08:58:57 +0000 (08:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Nov 2007 08:58:57 +0000 (08:58 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7785 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printerPPDDialog.inc

index b2e8819c301b30eac5a76c7c7d46c70e98d997eb..ac3aebc5965d3ace0966d0e82a39d14ff8b9d0d2 100644 (file)
@@ -260,9 +260,6 @@ class printerPPDDialog extends plugin
     $filename     = $this->pathToPPD.$ppdname;
     $contents     = file_get_contents($_PathOnHdd);
 
-    /* Open file handle */
-    $fp           = fopen($filename,"w+");
-
     /* Create the vendors path, if it doesn't exists already */
     if(!is_dir($this->pathToPPD.$vendor)){
       if(!(@mkdir($this->pathToPPD.$vendor))){
@@ -271,6 +268,9 @@ class printerPPDDialog extends plugin
       }
     }
   
+    /* Open file handle */
+    $fp           = fopen($filename,"w+");
+
     /* Check file handle & contents */
     if(!$fp){
       print_red(sprintf(_("Can't save file '%s'."),$filename));