Merge branch 'w23_MDL-33103_m23_dataestrict' of git://github.com/skodak/moodle

This commit is contained in:
Sam Hemelryk 2012-06-06 11:50:19 +12:00
commit f064f0fd15

View File

@ -100,7 +100,9 @@ if (!$formdata = $form->get_data()) {
$iid = csv_import_reader::get_new_iid('moddata');
$cir = new csv_import_reader($iid, 'moddata');
$readcount = $cir->load_csv_content($form->get_file_content('recordsfile'), $formdata->encoding, $formdata->fielddelimiter);
$filecontent = $form->get_file_content('recordsfile');
$readcount = $cir->load_csv_content($filecontent, $formdata->encoding, $formdata->fielddelimiter);
unset($filecontent);
if (empty($readcount)) {
print_error('csvfailed','data',"{$CFG->wwwroot}/mod/data/edit.php?d={$data->id}");
} else {