Index: branches/5.2.x/core/install.php =================================================================== diff -u -N -r15000 -r15012 --- branches/5.2.x/core/install.php (.../install.php) (revision 15000) +++ branches/5.2.x/core/install.php (.../install.php) (revision 15012) @@ -1,6 +1,6 @@ Application->TableFound(TABLE_PREFIX . 'UserSession', true) ) { + // update to 5.2.0 -> rename session table before using it + // don't rename any other table here, since their names could be used in upgrade script + $this->Conn->Query('RENAME TABLE ' . TABLE_PREFIX . 'UserSession TO ' . TABLE_PREFIX . 'UserSessions'); + $this->Conn->Query('RENAME TABLE ' . TABLE_PREFIX . 'SessionData TO ' . TABLE_PREFIX . 'UserSessionData'); + } + $next_preset = $this->Application->GetVar('next_preset'); if ($next_preset !== false) { $user_helper =& $this->Application->recallObject('UserHelper'); @@ -651,7 +658,7 @@ 'l1_Description' => 'Content', 'Status' => 4, ); - $this->Conn->doInsert($fields_hash, $this->toolkit->getSystemConfig('Database', 'TablePrefix') . 'Category'); + $this->Conn->doInsert($fields_hash, $this->toolkit->getSystemConfig('Database', 'TablePrefix') . 'Categories'); $this->toolkit->SetModuleRootCategory('Core', $this->Conn->getInsertID()); @@ -1042,7 +1049,7 @@ 'VariableName' => 'InstallFinished', 'VariableValue' => 1, ); - $this->Conn->doInsert($fields_hash, TABLE_PREFIX.'ConfigurationValues'); + $this->Conn->doInsert($fields_hash, TABLE_PREFIX.'SystemSettings'); } break; } @@ -1343,12 +1350,13 @@ function AlreadyInstalled() { $table_prefix = $this->toolkit->getSystemConfig('Database', 'TablePrefix'); + $settings_table = $this->TableExists('ConfigurationValues') ? 'ConfigurationValues' : 'SystemSettings'; $sql = 'SELECT VariableValue - FROM ' . $table_prefix . 'ConfigurationValues + FROM ' . $table_prefix . $settings_table . ' WHERE VariableName = "InstallFinished"'; - return $this->TableExists('ConfigurationValues') && $this->Conn->GetOne($sql); + return $this->TableExists($settings_table) && $this->Conn->GetOne($sql); } function CheckDatabase($check_installed = true)