From: Alexander Ebert Date: Wed, 2 Jan 2013 01:29:39 +0000 (+0100) Subject: Disallowed application uninstall if not within WCF ACP X-Git-Tag: 2.0.0_Beta_1~606^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=73957fa616e8b4a7694c1fbab840910525942598;p=GitHub%2FWoltLab%2FWCF.git Disallowed application uninstall if not within WCF ACP Fixes #1067 --- diff --git a/wcfsetup/install/files/lib/data/package/Package.class.php b/wcfsetup/install/files/lib/data/package/Package.class.php index ddc43081f5..4fbbe42417 100644 --- a/wcfsetup/install/files/lib/data/package/Package.class.php +++ b/wcfsetup/install/files/lib/data/package/Package.class.php @@ -159,8 +159,8 @@ class Package extends DatabaseObject { return false; } - // disallow uninstallation of current package or WCF - if ($this->package == 'com.woltlab.wcf' || $this->packageID == PACKAGE_ID) { + // disallow uninstallation of WCF and applications if not within WCF ACP + if ($this->package == 'com.woltlab.wcf' || ($this->isApplication && PACKAGE_ID != 1)) { return false; } @@ -348,16 +348,4 @@ class Package extends DatabaseObject { // write end $file->close(); } - - /** - * Returns a list of plugins for currently active application. - * - * @return wcf\data\package\PackageList - */ - public static function getPluginList() { - $pluginList = new PackageList(); - $pluginList->getConditionBuilder()->add("package.isApplication = ?", array(0)); - - return $pluginList; - } }