Skip to content

Commit

Permalink
Fixed a bug where on Geeklog Upgrade Language Configuration Option ha…
Browse files Browse the repository at this point in the history
…s incorrect selection (bug #1129)
  • Loading branch information
mystralkk committed Jun 11, 2022
1 parent 77c17be commit 476f377
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public_html/admin/install/classes/installer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ private function installEngine($installType, $installStep)
. $this->showReturnFormData($_POST) . PHP_EOL;
} else {
// Write the database info to db-config.php
if (!$this->writeDbConfig(Common::$env['dbconfig_path'], $DB)) {
if (($installType === 'install') && !$this->writeDbConfig(Common::$env['dbconfig_path'], $DB)) {
exit(Common::$LANG['INSTALL'][26] . ' ' . htmlspecialchars(Common::$env['dbconfig_path'])
. Common::$LANG['INSTALL'][58]);
}
Expand Down
8 changes: 5 additions & 3 deletions public_html/admin/install/success.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ function SUCCESS_deleteAll($baseDir)
if (is_readable($languagePath)) {
require_once __DIR__ . '/language/' . $language . '.php';

// Update $_CONF['language'] (issue #991)
$config = config::get_instance();
$config->set('language', $language, 'Core');
// Update $_CONF['language'] (issue #991, #1129)
if ($type === 'install') {
$config = config::get_instance();
$config->set('language', $language, 'Core');
}
} else {
require_once __DIR__ . '/language/english.php';
}
Expand Down

0 comments on commit 476f377

Please sign in to comment.