mkdir($filename);
}
$filename .= "/".item_img_name($stock_id).".jpg";
+
+ if ($_FILES['pic']['error'] == UPLOAD_ERR_INI_SIZE) {
+ display_error(_('The file size is over the maximum allowed.'));
+ $upload_file ='No';
+ }
+ elseif ($_FILES['pic']['error'] > 0) {
+ display_error(_('Error uploading file.'));
+ $upload_file ='No';
+ }
//But check for the worst
if ((list($width, $height, $type, $attr) = getimagesize($_FILES['pic']['tmp_name'])) !== false)
}
}
-function item_settings(&$stock_id, $new_id)
+function item_settings(&$stock_id, $new_item)
{
global $SysPrefs, $path_to_root;
switch (get_post('_tabs_sel')) {
default:
case 'settings':
- item_settings($stock_id, $new_id);
+ item_settings($stock_id, $new_item);
break;
case 'sales_pricing':
$_GET['stock_id'] = $stock_id;