Skip to content

Commit

Permalink
Merge pull request #3 from rollun-com/develop
Browse files Browse the repository at this point in the history
fix Ask to install tables for EAV and composite
  • Loading branch information
victorynox authored Jan 13, 2017
2 parents aa59d70 + 4a9f4a0 commit bf41eaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/DataStore/Composite/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public function uninstall()
public function install()
{
if (constant('APP_ENV') === 'dev' &&
$this->io->ask("You wont create Composite tables ?\n(Need for test)[No]", "No") === 'Yes') {
strcmp($this->io->ask("You wont create Composite tables ?\n(Need for test)[No]", "No"), 'Yes')
) {
//develop only
$tablesConfigDevelop = [
TableManager::KEY_TABLES_CONFIGS => Store::$develop_tables_config
Expand All @@ -76,7 +77,7 @@ public function install()
$tableManager->rewriteTable(Store::IMAGE_TABLE_NAME);
$tableManager->rewriteTable(Store::CATEGORY_TABLE_NAME);
$tableManager->rewriteTable(Store::CATEGORY_PRODUCT_TABLE_NAME);
if ($this->io->ask("You wont add data in Composite tables (Need for test)[No] ?", "no") == "Yes") {
if (strcmp($this->io->ask("You wont add data in Composite tables (Need for test)[No] ?", "no"), "Yes")) {
$this->addData();
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/DataStore/Eav/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function uninstall()
public function install()
{
if (constant('APP_ENV') === 'dev'
&& $this->io->ask("You wont create EAV tables ?\n(Need for test)[No]", "No") === 'Yes') {
&& strcmp($this->io->ask("You wont create EAV tables ?\n(Need for test)[No]", "No"), 'Yes')) {
//develop only
$tablesConfigDevelop = [
TableManager::KEY_TABLES_CONFIGS => array_merge(
Expand All @@ -100,7 +100,7 @@ public function install()
$tableManager->rewriteTable(StoreCatalog::PROP_LINKED_URL_TABLE_NAME);
$tableManager->rewriteTable(StoreCatalog::PROP_PRODUCT_CATEGORY_TABLE_NAME);
$tableManager->rewriteTable(StoreCatalog::PROP_TAG_TABLE_NAME);
if ($this->io->ask("You wont add data in EAV tables (Need for test)[No] ?", "no") == "Yes") {
if (strcmp($this->io->ask("You wont add data in EAV tables (Need for test)[No] ?", "No"), "Yes")) {
$this->addData();
}
} else {
Expand Down

0 comments on commit bf41eaf

Please sign in to comment.