Removed obsolete stock_move.person_id field and related handling.
[fa-stable.git] / inventory / manage / items.php
index 0b069ea3c66702305a50a89ba2e5628175f4b273..e3d710ee054db4c40dae837b02b5082556f2cc9f 100644 (file)
@@ -64,6 +64,15 @@ if (isset($_FILES['pic']) && $_FILES['pic']['name'] != '')
                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)
@@ -254,7 +263,7 @@ if (isset($_POST['delete']) && strlen($_POST['delete']) > 1)
        }
 }
 
-function item_settings(&$stock_id, $new_id
+function item_settings(&$stock_id, $new_item
 {
        global $SysPrefs, $path_to_root;
 
@@ -474,7 +483,7 @@ tabbed_content_start('tabs', array(
        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;