From 73957fa616e8b4a7694c1fbab840910525942598 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 2 Jan 2013 02:29:39 +0100 Subject: [PATCH] Disallowed application uninstall if not within WCF ACP Fixes #1067 --- .../files/lib/data/package/Package.class.php | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) 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; - } } -- 2.20.1