mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR: add text/plain to the list of accepted mime types (from r105985)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112484 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0bf70b9032
commit
b5f0950c29
@ -535,7 +535,11 @@ class ModelAdmin_CollectionController extends Controller {
|
||||
$loader = new $importerClass($data['ClassName']);
|
||||
|
||||
// File wasn't properly uploaded, show a reminder to the user
|
||||
if(empty($_FILES['_CsvFile']['tmp_name']) || $_FILES['_CsvFile']['type'] != 'text/csv' || file_get_contents($_FILES['_CsvFile']['tmp_name']) == '') {
|
||||
if(
|
||||
empty($_FILES['_CsvFile']['tmp_name']) ||
|
||||
array_search($_FILES['_CsvFile']['type'], array('text/csv', 'text/plain')) === false ||
|
||||
file_get_contents($_FILES['_CsvFile']['tmp_name']) == ''
|
||||
) {
|
||||
$form->sessionMessage(_t('ModelAdmin.NOCSVFILE', 'Please browse for a CSV file to import'), 'good');
|
||||
$this->redirectBack();
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user