mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 21:16:47 +00:00
Some better feedback in the import process.
This commit is contained in:
@@ -54,15 +54,20 @@ class CsvImporter implements ImporterInterface
|
||||
$reader->setDelimiter($config['delimiter']);
|
||||
$start = $config['has-headers'] ? 1 : 0;
|
||||
$results = $reader->fetch();
|
||||
|
||||
Log::notice('Building importable objects from CSV file.');
|
||||
|
||||
foreach ($results as $index => $row) {
|
||||
if ($index >= $start) {
|
||||
$line = $index + 1;
|
||||
Log::debug('----- import entry build start --');
|
||||
Log::debug(sprintf('Now going to import row %d.', $index));
|
||||
$importEntry = $this->importSingleRow($index, $row);
|
||||
$this->collection->put($index, $importEntry);
|
||||
$this->collection->put($line, $importEntry);
|
||||
}
|
||||
}
|
||||
Log::debug(sprintf('Import collection contains %d entries', $this->collection->count()));
|
||||
Log::notice(sprintf('Built %d importable object(s) from your CSV file.', $this->collection->count()));
|
||||
|
||||
return $this->collection;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user