mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
BUGFIX: CSVBulkLoader import method now no longer requires files to end in '.csv'. Some projects want to import files in CSV format, but not of csv file type. (from r108887)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112793 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a12b3f037f
commit
b3f510eef1
@ -537,7 +537,6 @@ class ModelAdmin_CollectionController extends Controller {
|
||||
// File wasn't properly uploaded, show a reminder to the user
|
||||
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');
|
||||
@ -569,6 +568,7 @@ class ModelAdmin_CollectionController extends Controller {
|
||||
$this->redirectBack();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the columns available in the column selection field.
|
||||
* Overload this to make other columns available
|
||||
|
Loading…
x
Reference in New Issue
Block a user