From b7c740a06c9115673df29896cb0fcef82d50023d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 24 Dec 2016 18:23:00 +0100 Subject: [PATCH] Fixed database table prefix --- .../files/acp/update_com.woltlab.wcf_3.0_columnLength.php | 6 +++--- .../files/acp/update_com.woltlab.wcf_3.0_dropColumns.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_columnLength.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_columnLength.php index 416f33b637..f2818b7a91 100644 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_columnLength.php +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_columnLength.php @@ -6,7 +6,7 @@ use wcf\util\StringUtil; /** * @author Alexander Ebert - * @copyright 2001-2015 WoltLab GmbH + * @copyright 2001-2016 WoltLab GmbH * @license GNU Lesser General Public License * @package WoltLabSuite\Core */ @@ -127,11 +127,11 @@ if ($rebuildData === null) { $i = $rebuildData['i']; // truncate values -$statement = WCF::getDB()->prepareStatement($lines[$i * 2]); +$statement = WCF::getDB()->prepareStatement(str_replace('wcf1_', 'wcf'.WCF_N.'_', $lines[$i * 2])); $statement->execute(); // decrease column width -$statement = WCF::getDB()->prepareStatement($lines[$i * 2 + 1]); +$statement = WCF::getDB()->prepareStatement(str_replace('wcf1_', 'wcf'.WCF_N.'_', $lines[$i * 2 + 1])); $statement->execute(); $rebuildData['i']++; diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_dropColumns.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_dropColumns.php index ae47579c2d..0605716c31 100644 --- a/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_dropColumns.php +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_3.0_dropColumns.php @@ -5,7 +5,7 @@ use wcf\util\StringUtil; /** * @author Alexander Ebert - * @copyright 2001-2015 WoltLab GmbH + * @copyright 2001-2016 WoltLab GmbH * @license GNU Lesser General Public License * @package WoltLabSuite\Core */ @@ -32,7 +32,7 @@ if ($rebuildData === null) { // Using a single `ALTER TABLE` to drop multiple columns // results in the same runtime, because copying the table // is what actually takes ages. -$statement = WCF::getDB()->prepareStatement($lines[$rebuildData['i']]); +$statement = WCF::getDB()->prepareStatement(str_replace('wcf1_', 'wcf'.WCF_N.'_', $lines[$rebuildData['i']])); $statement->execute(); $rebuildData['i']++; -- 2.20.1