Skip to content

Commit

Permalink
dont install the default modules when skipping the database import
Browse files Browse the repository at this point in the history
  • Loading branch information
haraldpdl committed Nov 11, 2016
1 parent accb87a commit 355bcdc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
4 changes: 4 additions & 0 deletions catalog/install/templates/pages/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ function prepareDB() {
e.preventDefault();

prepareDB();
} else {
if (doImport !== true) {
$('#installForm').append('<input type="hidden" name="DB_SKIP_IMPORT" value="true">');
}
}
});

Expand Down
32 changes: 17 additions & 15 deletions catalog/install/templates/pages/install_4.php
Original file line number Diff line number Diff line change
Expand Up @@ -638,29 +638,31 @@
]
];

foreach ($modules as $m) {
$m_installed = [];
if (!isset($_POST['DB_SKIP_IMPORT'])) {
foreach ($modules as $m) {
$m_installed = [];

foreach ($m['modules'] as $module) {
$file = $module['file'];
$class = isset($module['class']) ? $module['class'] : basename($file, '.php');
$code = isset($module['code']) ? $module['code'] : $file;
foreach ($m['modules'] as $module) {
$file = $module['file'];
$class = isset($module['class']) ? $module['class'] : basename($file, '.php');
$code = isset($module['code']) ? $module['code'] : $file;

include($m['dir'] . $file);
include($m['dir'] . $file);

$mo = new $class();
$mo->install();
$mo = new $class();
$mo->install();

$m_installed[] = $code;
$m_installed[] = $code;

if (isset($module['params'])) {
foreach ($module['params'] as $key => $value) {
$OSCOM_Db->save('configuration', ['configuration_value' => $value], ['configuration_key' => $key]);
if (isset($module['params'])) {
foreach ($module['params'] as $key => $value) {
$OSCOM_Db->save('configuration', ['configuration_value' => $value], ['configuration_key' => $key]);
}
}
}
}

$OSCOM_Db->save('configuration', ['configuration_value' => implode(';', $m_installed)], ['configuration_key' => $m['key']]);
$OSCOM_Db->save('configuration', ['configuration_value' => implode(';', $m_installed)], ['configuration_key' => $m['key']]);
}
}
?>

Expand Down

0 comments on commit 355bcdc

Please sign in to comment.