Replace deprecated prepareModel call in ImportExport behavior

This commit is contained in:
Ben Thomson 2018-12-30 16:35:17 +08:00
parent b6bd643e21
commit 63dfb7fad3
1 changed files with 4 additions and 4 deletions

View File

@ -210,7 +210,7 @@ class ImportExportController extends ControllerBehavior
catch (Exception $ex) { catch (Exception $ex) {
$this->controller->handleError($ex); $this->controller->handleError($ex);
} }
$this->vars['sourceIndexOffset'] = $this->getImportSourceIndexOffset($importOptions['firstRowTitles']); $this->vars['sourceIndexOffset'] = $this->getImportSourceIndexOffset($importOptions['firstRowTitles']);
return $this->importExportMakePartial('import_result_form'); return $this->importExportMakePartial('import_result_form');
@ -334,7 +334,7 @@ class ImportExportController extends ControllerBehavior
return $firstRow; return $firstRow;
} }
/** /**
* Get the index offset to add to the reported row number in status messages * Get the index offset to add to the reported row number in status messages
* *
@ -627,8 +627,8 @@ class ImportExportController extends ControllerBehavior
? 'getColumnValueRaw' ? 'getColumnValueRaw'
: 'getColumnValue'; : 'getColumnValue';
$model = $widget->prepareModel(); $query = $widget->prepareQuery();
$results = $model->get(); $results = $query->get();
foreach ($results as $result) { foreach ($results as $result) {
$record = []; $record = [];
foreach ($columns as $column) { foreach ($columns as $column) {