diff --git a/extra/examples/wsc-dev-config-55.json b/extra/examples/wsc-dev-config-55.json
index 605aa81ebf8..24b5118aa7e 100644
--- a/extra/examples/wsc-dev-config-55.json
+++ b/extra/examples/wsc-dev-config-55.json
@@ -4,8 +4,7 @@
"auto": true,
"host": "localhost",
"password": "root",
- "username": "root",
- "dbNumber": "2"
+ "username": "root"
},
"useDefaultInstallPath": true,
"forceStaticCookiePrefix": true
diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php
index 607e4315cfb..792ed2893d8 100644
--- a/wcfsetup/install/files/lib/system/WCFSetup.class.php
+++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php
@@ -651,7 +651,6 @@ protected function configureDB()
$dbUser = $_ENV['WCFSETUP_DBUSER'];
$dbPassword = $_ENV['WCFSETUP_DBPASSWORD'];
$dbName = $_ENV['WCFSETUP_DBNAME'];
- $dbNumber = 1;
$attemptConnection = true;
} elseif (self::$developerMode && ($config = DevtoolsSetup::getInstance()->getDatabaseConfig()) !== null) {
@@ -659,7 +658,6 @@ protected function configureDB()
$dbUser = $config['username'];
$dbPassword = $config['password'];
$dbName = $config['dbName'];
- $dbNumber = $config['dbNumber'];
if ($config['auto']) {
$attemptConnection = true;
@@ -669,7 +667,6 @@ protected function configureDB()
$dbUser = 'root';
$dbPassword = '';
$dbName = 'wcf';
- $dbNumber = 1;
}
if ($attemptConnection) {
@@ -686,11 +683,6 @@ protected function configureDB()
$dbName = $_POST['dbName'];
}
- // ensure that $dbNumber is zero or a positive integer
- if (isset($_POST['dbNumber'])) {
- $dbNumber = \max(0, \intval($_POST['dbNumber']));
- }
-
// get port
$dbHostWithoutPort = $dbHost;
$dbPort = 0;
@@ -790,7 +782,7 @@ protected function configureDB()
*/
// check for table conflicts
- $conflictedTables = $this->getConflictedTables($db, $dbNumber);
+ $conflictedTables = $this->getConflictedTables($db);
// write config.inc
if (empty($conflictedTables)) {
@@ -803,7 +795,7 @@ protected function configureDB()
$file->write("\$dbUser = '" . \str_replace("'", "\\'", $dbUser) . "';\n");
$file->write("\$dbPassword = '" . \str_replace("'", "\\'", $dbPassword) . "';\n");
$file->write("\$dbName = '" . \str_replace("'", "\\'", $dbName) . "';\n");
- $file->write("if (!defined('WCF_N')) define('WCF_N', {$dbNumber});\n");
+ $file->write("if (!defined('WCF_N')) define('WCF_N', 1);\n");
$file->close();
// go to next step
@@ -823,7 +815,6 @@ protected function configureDB()
'dbUser' => $dbUser,
'dbPassword' => $dbPassword,
'dbName' => $dbName,
- 'dbNumber' => $dbNumber,
'nextStep' => 'configureDB',
]);
WCF::getTPL()->display('stepConfigureDB');
@@ -834,17 +825,13 @@ protected function configureDB()
* which will be created in the next step.
*
* @param \wcf\system\database\Database $db
- * @param int $dbNumber
* @return string[] list of already existing tables
*/
- protected function getConflictedTables($db, $dbNumber)
+ protected function getConflictedTables($db)
{
// get content of the sql structure file
$sql = \file_get_contents(TMP_DIR . 'setup/db/install.sql');
- // installation number value 'n' (WCF_N) must be reflected in the executed sql queries
- $sql = \str_replace('wcf1_', 'wcf' . $dbNumber . '_', $sql);
-
// get all tablenames which should be created
\preg_match_all("%CREATE\\s+TABLE\\s+(\\w+)%", $sql, $matches);
diff --git a/wcfsetup/install/files/lib/system/devtools/DevtoolsSetup.class.php b/wcfsetup/install/files/lib/system/devtools/DevtoolsSetup.class.php
index ba35890fdf7..62e44910d65 100644
--- a/wcfsetup/install/files/lib/system/devtools/DevtoolsSetup.class.php
+++ b/wcfsetup/install/files/lib/system/devtools/DevtoolsSetup.class.php
@@ -79,7 +79,6 @@ public function getDatabaseConfig()
'password' => $dbConfig['password'],
'username' => $dbConfig['username'],
'dbName' => $dbName,
- 'dbNumber' => $dbConfig['dbNumber'],
];
}
diff --git a/wcfsetup/setup/lang/setup_de.xml b/wcfsetup/setup/lang/setup_de.xml
index 8bac0d1ba24..86ea5f2d652 100644
--- a/wcfsetup/setup/lang/setup_de.xml
+++ b/wcfsetup/setup/lang/setup_de.xml
@@ -61,11 +61,9 @@
{$exception->getPrevious()->getMessage()}{/if}]]>
{implode from=$conflictedTables item="table"}{$table}{/implode}.
Um dieses Problem zu beheben, können Sie:
1. diese Tabelle{if $conflictedTables|count > 1}n{/if} manuell löschen und die „Weiter“ Schaltfläche betätigen, oder
2. Sie geben die Daten einer anderen Datenbank ein und betätigen die „Weiter“ Schaltfläche, oder
3. Sie geben eine von „{$dbNumber}“ unterschiedliche Installationsnummer an und betätigen die „Weiter“ Schaltfläche.]]>
{implode from=$conflictedTables item="table"}{$table}{/implode}.
Um dieses Problem zu beheben, können Sie:
1. diese Tabelle{if $conflictedTables|count > 1}n{/if} manuell löschen und die „Weiter“ Schaltfläche betätigen, oder
2. Sie geben die Daten einer anderen Datenbank ein und betätigen die „Weiter“ Schaltfläche.]]>
{$exception->getPrevious()->getMessage()}{/if}]]>
{implode from=$conflictedTables item="table"}{$table}{/implode}.
To solve this problem, please do one of the following:
1. Remove the table{if $conflictedTables|count > 1}s{/if} manually and continue the installation with the “Next” button or
2. You re-enter the database access information, but to a different database and continue the installation with the “Next” button or
3. Enter a new installation number, not forgetting to continue the installation with the “Next” Button.]]>
{implode from=$conflictedTables item="table"}{$table}{/implode}.
To solve this problem, please do one of the following:
1. Remove the table{if $conflictedTables|count > 1}s{/if} manually and continue the installation with the “Next” button or
2. You re-enter the database access information, but to a different database and continue the installation with the “Next” button.]]>