WCF plugins which have other requirements than the WCF will stop installation immedia...
authorJim Martens <jim1@live.de>
Mon, 23 Jul 2012 09:37:01 +0000 (11:37 +0200)
committerJim Martens <jim1@live.de>
Mon, 23 Jul 2012 09:37:01 +0000 (11:37 +0200)
wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php

index f81ab4359e5d73d3b0adb03311f3cd4155572e85..43927456721c48d876268682bb03c70ddf4f9e79 100644 (file)
@@ -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) {