From e059a9dd318690f11afeb57d89f14ff2ff3bfeee Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Mon, 23 Jul 2012 11:37:01 +0200 Subject: [PATCH] WCF plugins which have other requirements than the WCF will stop installation immediately. --- .../package/PackageInstallationDispatcher.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index f81ab4359e..4392745672 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -233,6 +233,15 @@ class PackageInstallationDispatcher { } } + // if package is plugin to com.woltlab.wcf it must not have any other requirement + $requirements = $this->getArchive()->getRequirements(); + if ($package->parentPackageID == 1 && count($requirements)) { + foreach ($requirements as $package => $data) { + if ($package == 'com.woltlab.wcf') continue; + throw new SystemException('Package '.$package->package.' is plugin of com.woltlab.wcf (WCF) but has more than one requirement.'); + } + } + // insert requirements and dependencies $requirements = $this->getArchive()->getAllExistingRequirements(); if (count($requirements) > 0) { -- 2.20.1