diff --git a/modules/backend/behaviors/ImportExportController.php b/modules/backend/behaviors/ImportExportController.php index 3cba09ca1..6b371f68b 100644 --- a/modules/backend/behaviors/ImportExportController.php +++ b/modules/backend/behaviors/ImportExportController.php @@ -210,6 +210,8 @@ class ImportExportController extends ControllerBehavior catch (Exception $ex) { $this->controller->handleError($ex); } + + $this->vars['sourceIndexOffset'] = $this->getImportSourceIndexOffset($importOptions['firstRowTitles']); return $this->importExportMakePartial('import_result_form'); } @@ -332,6 +334,17 @@ class ImportExportController extends ControllerBehavior return $firstRow; } + + /** + * Get the index offset to add to the reported row number in status messages + * + * @param bool $firstRowTitles Whether or not the first row contains column titles + * @return int $offset + */ + protected function getImportSourceIndexOffset($firstRowTitles) + { + return $firstRowTitles ? 2 : 1; + } protected function makeImportUploadFormWidget() { diff --git a/modules/backend/behaviors/importexportcontroller/partials/_import_result_form.htm b/modules/backend/behaviors/importexportcontroller/partials/_import_result_form.htm index 6a3cd1c40..c67f7cdd3 100644 --- a/modules/backend/behaviors/importexportcontroller/partials/_import_result_form.htm +++ b/modules/backend/behaviors/importexportcontroller/partials/_import_result_form.htm @@ -61,7 +61,7 @@