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:
Ingo Schommer 2010-10-15 02:34:16 +00:00
parent 0bf70b9032
commit b5f0950c29

View File

@ -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;