diff --git a/modules/Vtiger/views/Import.php b/modules/Vtiger/views/Import.php index c30168cc4f20a7e69ce090d5d1cf84374878930c..901b723b746e5d18657183cd428d384b13a918c7 100644 --- a/modules/Vtiger/views/Import.php +++ b/modules/Vtiger/views/Import.php @@ -129,6 +129,13 @@ class Vtiger_Import_View extends Vtiger_Index_View { } //End + $fileFormat = $request->get('fileFormat'); + if (!$fileFormat || !in_array($fileFormat, $supportedFileTypes)) { + $fileFormat = 'csv'; + } else { + $fileFormat = strtolower($fileFormat); + } + // Pre-conditional check for CSV import. if ($fileFormat == 'csv') { $isLocalInfileEnabled = Vtiger_Util_Helper::checkDbLocalInfileSupport(); @@ -146,7 +153,7 @@ class Vtiger_Import_View extends Vtiger_Index_View { $viewer->assign('CURRENCIES', getAllCurrencies()); } - $viewer->assign('FORMAT', $request->get('fileFormat')); + $viewer->assign('FORMAT', $fileFormat); return $viewer->view('ImportBasicStep.tpl', 'Import'); }