aboutsummaryrefslogtreecommitdiff
path: root/lib/sfIsisImporterManager.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sfIsisImporterManager.class.php')
-rw-r--r--lib/sfIsisImporterManager.class.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/sfIsisImporterManager.class.php b/lib/sfIsisImporterManager.class.php
index 548587e..c08545a 100644
--- a/lib/sfIsisImporterManager.class.php
+++ b/lib/sfIsisImporterManager.class.php
@@ -130,7 +130,7 @@ class sfIsisImporterManager extends IsisConnector
* @param string $section Caller section (whether an action or task)
* @param int $entries Number of entries to import (defaults to all)
*/
- public function massImport($caller, $section, $entries = NULL)
+ public function massImport($caller, $section, $entries = NULL, $offset = 0)
{
// Additional logging settings.
$this->logger->setCaller($caller);
@@ -145,11 +145,12 @@ class sfIsisImporterManager extends IsisConnector
{
// Determine base model and max entries.
$this->log('Starting mass import procedure for database schema "'. $database .'".', 'notice');
- $base_model = $importer->isis->format['import']['base_model'];
- $this->entries = ($entries != NULL && $entries <= $importer->isis->entries) ? $entries : $importer->isis->entries;
+ $base_model = $importer->isis->format['import']['base_model'];
+ $this->max = ($entries != NULL && $entries + $offset <= $importer->isis->entries) ? $entries + $offset : $importer->isis->entries;
- if ($base_model) {
- for ($entry = 1; $entry <= $this->entries; $entry++)
+ if ($base_model)
+ {
+ for ($entry = $offset + 1; $entry <= $this->max; $entry++)
{
$importer->addEntry($base_model, $entry);
$this->progress($entry);