mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02: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.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@108887 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
229760a1e1
commit
31a9271c85
@ -535,7 +535,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');
|
||||
@ -567,6 +566,7 @@ class ModelAdmin_CollectionController extends Controller {
|
||||
Director::redirectBack();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the columns available in the column selection field.
|
||||
* Overload this to make other columns available
|
||||
|
Loading…
Reference in New Issue
Block a user