From: hickert Date: Tue, 13 Nov 2007 08:58:57 +0000 (+0000) Subject: Fixed PPD upload if vendor directory wasn't created. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3146c6bb9f72419c213c8c074592a1063705b925;p=gosa.git Fixed PPD upload if vendor directory wasn't created. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7785 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc index b2e8819c3..ac3aebc59 100644 --- a/plugins/admin/systems/class_printerPPDDialog.inc +++ b/plugins/admin/systems/class_printerPPDDialog.inc @@ -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));