From d6dd4494459ceb0482051327132bbf0a07352682 Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Sun, 19 Jun 2016 23:56:10 -0400 Subject: [PATCH] Only show importer progress if on command line. It broke error display from web. --- app/Console/Commands/ObjectImportCommand.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/ObjectImportCommand.php b/app/Console/Commands/ObjectImportCommand.php index 0c33bdd5bb..7661087577 100644 --- a/app/Console/Commands/ObjectImportCommand.php +++ b/app/Console/Commands/ObjectImportCommand.php @@ -103,8 +103,10 @@ class ObjectImportCommand extends Command { $this->accessories = Accessory::All(['name']); $this->consumables = Consumable::All(['name']); $this->customfields = CustomField::All(['name']); - - $bar = $this->output->createProgressBar(count($newarray)); + $bar = NULL; + if(!$this->option('web-importer')) { + $bar = $this->output->createProgressBar(count($newarray)); + } // Loop through the records DB::transaction(function() use (&$newarray, $bar){ Model::unguard(); @@ -180,12 +182,16 @@ class ObjectImportCommand extends Command { break; } - $bar->advance(); + if(!$this->option('web-importer')) { + $bar->advance(); + } $this->log('------------- Action Summary ----------------'); } }); - $bar->finish(); + if(!$this->option('web-importer')) { + $bar->finish(); + } $this->log('=====================================');