Skip to content

Commit

Permalink
Fixed a bug where the value of $_DB_table_prefix was cached even afte…
Browse files Browse the repository at this point in the history
…r the installer write into "db-config.php" (bug #951)
  • Loading branch information
mystralkk committed Aug 26, 2019
1 parent 84aa349 commit 0ac32ab
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions public_html/admin/install/classes/installer.class.php
Expand Up @@ -1067,6 +1067,8 @@ private function autoInstallPlugin($plugin, array $inst_params, $verbose = true)
{
global $_CONF, $_TABLES, $_USER, $_DB_dbms, $_DB_table_prefix;

// Don't use 'include' or 'require' here! (bug #951)
$this->includeConfig($this->env['dbconfig_path']);
$fake_uid = false;

if (!isset($_USER['uid'])) {
Expand All @@ -1080,7 +1082,7 @@ private function autoInstallPlugin($plugin, array $inst_params, $verbose = true)
COM_errorLog("Attempting to install the '{$plugin}' plugin", 1);
}

// sanity checks for $inst_parms
// sanity checks for $inst_params
if (isset($inst_params['info'])) {
$pi_name = $inst_params['info']['pi_name'];
$pi_version = $inst_params['info']['pi_version'];
Expand Down Expand Up @@ -1917,7 +1919,7 @@ private function includeConfig($dbConfigFilePath)
$_DB_dbms, $_DB_charset;

$dbConfigData = @file_get_contents($dbConfigFilePath);
$dbConfigData =str_replace('<' . '?php', '', $dbConfigData);
$dbConfigData = str_replace('<' . '?php', '', $dbConfigData);
eval($dbConfigData);
}

Expand Down Expand Up @@ -4283,9 +4285,10 @@ private function migrateStep4()
* Installer engine
* The guts of the installation and upgrade package.
*
* @param string $installType 'install' or 'upgrade'
* @param int $installStep 1 - 4
* @param string $installType 'install' or 'upgrade'
* @param int $installStep 1 - 4
* @return string
* @throws Exception
*/
private function installEngine($installType, $installStep)
{
Expand Down

0 comments on commit 0ac32ab

Please sign in to comment.