From: Alexander Ebert Date: Tue, 3 Mar 2015 18:52:18 +0000 (+0100) Subject: Loosening check for drop table X-Git-Tag: 2.1.1~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4b5bdfe2ec94c40043d9c1030f34ee85d6a475da;p=GitHub%2FWoltLab%2FWCF.git Loosening check for drop table --- diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationSQLParser.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationSQLParser.class.php index ba3726eb9e..268c7e5347 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationSQLParser.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationSQLParser.class.php @@ -409,14 +409,8 @@ class PackageInstallationSQLParser extends SQLParser { protected function executeDropTableStatement($tableName) { if ($this->test) { if (in_array($tableName, $this->existingTables)) { - if (isset($this->knownTables[$tableName])) { - if ($this->knownTables[$tableName] != $this->package->packageID) { - throw new SystemException("Cannot drop table '".$tableName."'. A package can only drop own tables."); - } - } - else { - if (!isset($this->conflicts['DROP TABLE'])) $this->conflicts['DROP TABLE'] = array(); - $this->conflicts['DROP TABLE'][] = $tableName; + if (isset($this->knownTables[$tableName]) && $this->knownTables[$tableName] != $this->package->packageID) { + throw new SystemException("Cannot drop table '".$tableName."'. A package can only drop own tables."); } } }