[Vtigercrm-commits] [vtiger development] #7412: On Import of too large a file the error message is incorrect.

vtiger development vtiger-tickets at trac.vtiger.com
Fri May 11 08:21:11 PDT 2012


#7412: On Import of too large a file the error message is incorrect.
-----------------------+----------------------------------------------------
 Reporter:  alanlord   |       Owner:  developer
     Type:  defect     |      Status:  new      
 Priority:  minor      |   Milestone:  6.0.0    
Component:  vtigercrm  |     Version:  5.4.0    
 Severity:  Medium     |    Keywords:           
-----------------------+----------------------------------------------------
 Following on from bug#

 In file modules/Import/Controllers/import_index.Controller.php in the
 function (~line 180)

 public static function validateFileUpload($userInputObject) {
         global $current_user;

         $uploadMaxSize = Import_Utils::getMaxUploadSize();
         $importDirectory = Import_Utils::getImportDirectory();
         $temporaryFileName =
 Import_Utils::getImportFilePath($current_user);

         if(!is_uploaded_file($_FILES['import_file']['tmp_name'])) {
                 $userInputObject->set('error_message',
 getTranslatedString('LBL_FILE_UPLOAD_FAILED', 'Import'));
                 return false;
         }
         if ($_FILES['userfile']['size'] > $uploadMaxSize) {
                 $userInputObject->set('error_message',
 getTranslatedString('LBL_IMPORT_ERROR_LARGE_FILE', 'Import').
 ...

 The first error message "LBL_FILE_UPLOAD_FAILED" is generated if the file
 is too large for the limit set in the php.ini configuration file.

 This is not right.

 If the file is too large a better error (like the second one) should be
 called.

-- 
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/7412>
vtiger development <http://trac.vtiger.com/>
vtiger CRM



More information about the vtigercrm-commits mailing list