Index: branches/5.1.x/units/shipping_quote_engines/usps.php =================================================================== diff -u -N -r13549 -r13566 --- branches/5.1.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 13549) +++ branches/5.1.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 13566) @@ -1,6 +1,6 @@ 10 ) { $res = substr($res, 0, 10); - } + } return $res != '' ? $res : $phone; } @@ -991,6 +991,11 @@ } if ( $label_file != '' ) { + $file_helper =& $this->Application->recallObject('FileHelper'); + /* @var $file_helper FileHelper */ + + $file_helper->CheckFolder(USPS_LABEL_FOLDER); + if (!$handle = fopen($label_file, 'a')) echo "Cannot open file ($label_file)"; if ( @fwrite($handle, $DeliveryConfirmationLabel) === FALSE) echo "Cannot write to file ($label_file)"; } Index: branches/5.1.x/units/products/products_config.php =================================================================== diff -u -N -r13549 -r13566 --- branches/5.1.x/units/products/products_config.php (.../products_config.php) (revision 13549) +++ branches/5.1.x/units/products/products_config.php (.../products_config.php) (revision 13566) @@ -1,6 +1,6 @@ Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Automatic', 2 => 'la_Manual'), 'use_phrases' => 1, 'default' => 1), 'ImportSource' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Upload', 2 => 'la_Local'), 'use_phrases' => 1, 'default' => 2), - 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => (defined('EXPORT_BASE_PATH') ? EXPORT_BASE_PATH : '/admin/export') . '/'), + 'ImportFilename' => Array ('type' => 'string', 'formatter' => 'kUploadFormatter', 'max_size' => MAX_UPLOAD_SIZE, 'upload_dir' => EXPORT_BASE_PATH . '/'), 'ImportLocalFilename' => Array ('type' => 'string', 'formatter' => 'kOptionsFormatter', 'default' => ''), 'CheckDuplicatesMethod' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_IDField', 2 => 'la_OtherFields'), 'use_phrases' => 1, 'default' => 1), 'ReplaceDuplicates' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1, 'default' => 0), Index: branches/5.1.x/units/orders/orders_event_handler.php =================================================================== diff -u -N -r13558 -r13566 --- branches/5.1.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 13558) +++ branches/5.1.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 13566) @@ -1,6 +1,6 @@ Application->InitParser(); $o = $this->Application->ParseBlock(array('name'=>'in-commerce/orders/orders_pdf')); + + $file_helper =& $this->Application->recallObject('FileHelper'); + /* @var $file_helper FileHelper */ + + $file_helper->CheckFolder(EXPORT_PATH); + $htmlFile = EXPORT_PATH . '/tmp.html'; $fh = fopen($htmlFile, 'w'); fwrite($fh, $o);