Skip to content

Commit

Permalink
[FEATURE] skip rebuild index if not necessary (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
mterwei authored and aimeos committed Mar 29, 2019
1 parent 1689c15 commit 776560e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/mshoplib/setup/default/DemoRebuildIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ public function migrate()
{
$this->msg( 'Rebuilding index for demo data', 0 );

$value = $this->additional->getConfig()->get( 'setup/default/demo', '' );

if( $value === '' )
{
$this->status( 'OK' );
return;
}

\Aimeos\MShop::create( $this->additional, 'index' )->rebuildIndex();

$this->status( 'done' );
Expand Down

0 comments on commit 776560e

Please sign in to comment.