Remove unused local variables
authorMatthias Schmidt <gravatronics@live.com>
Sat, 30 Jul 2016 14:49:27 +0000 (16:49 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 30 Jul 2016 14:59:03 +0000 (16:59 +0200)
wcfsetup/install/files/lib/acp/form/NotificationPresetSettingsForm.class.php
wcfsetup/install/files/lib/form/NotificationSettingsForm.class.php
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/lib/system/WCFSetup.class.php
wcfsetup/install/files/lib/util/DOMUtil.class.php

index 5fd6f67824a85c32f7b6c9528ae47b9de8d8577a..94f5b949a6605f7132347e2674389a1de481b2d1 100644 (file)
@@ -117,10 +117,8 @@ class NotificationPresetSettingsForm extends AbstractForm {
                
                // default values
                if (empty($_POST)) {
-                       $eventIDs = [];
                        foreach ($this->events as $events) {
                                foreach ($events as $event) {
-                                       $eventIDs[] = $event->eventID;
                                        $this->settings[$event->eventID] = [
                                                'enabled' => $event->preset,
                                                'mailNotificationType' => $event->presetMailNotificationType
index f8b9a4f4dd233bc9d6933c1ee7a1540e5c364512..ab861cf320d58d9f60398f6bf3952b9237a6610d 100644 (file)
@@ -116,10 +116,8 @@ class NotificationSettingsForm extends AbstractForm {
                // default values
                if (empty($_POST)) {
                        // get user settings
-                       $eventIDs = [];
                        foreach ($this->events as $events) {
                                foreach ($events as $event) {
-                                       $eventIDs[] = $event->eventID;
                                        $this->settings[$event->eventID] = [
                                                'enabled' => false,
                                                'mailNotificationType' => 'none'
index c9cb59ce003bb6c22e8aae23f2f6fef06d7d8109..55e84187aa2b60fa07d926376ee6717fbc049773 100644 (file)
@@ -506,7 +506,6 @@ class WCF {
         * @throws      SystemException
         */
        protected function loadApplication(Application $application, $isDependentApplication = false) {
-               $applicationObject = null;
                $package = PackageCache::getInstance()->getPackage($application->packageID);
                // package cache might be outdated
                if ($package === null) {
@@ -521,7 +520,7 @@ class WCF {
                                throw new SystemException("application identified by package id '".$application->packageID."' is unknown");
                        }
                }
-                       
+               
                $abbreviation = ApplicationHandler::getInstance()->getAbbreviation($application->packageID);
                $packageDir = FileUtil::getRealPath(WCF_DIR.$package->packageDir);
                self::$autoloadDirectories[$abbreviation] = $packageDir . 'lib/';
index a5b5babc22bab4e4b7a4e5006e565511906e132e..5743ef87aec06cfd57f8a4b1132968fbc29bdc04 100644 (file)
@@ -434,7 +434,7 @@ class WCFSetup extends WCF {
         */
        protected function configureDirectories() {
                // get available packages
-               $applications = $packages = [];
+               $packages = [];
                foreach (glob(TMP_DIR . 'install/packages/*') as $file) {
                        $filename = basename($file);
                        if (preg_match('~\.(?:tar|tar\.gz|tgz)$~', $filename)) {
@@ -443,13 +443,11 @@ class WCFSetup extends WCF {
                                
                                $application = Package::getAbbreviation($package->getPackageInfo('name'));
                                
-                               $applications[] = $application;
                                $packages[$application] = [
                                        'directory' => ($package->getPackageInfo('applicationDirectory') ?: $application),
                                        'packageDescription' => $package->getLocalizedPackageInfo('packageDescription'),
                                        'packageName' => $package->getLocalizedPackageInfo('packageName')
                                ];
-                               
                        }
                }
                
@@ -468,9 +466,9 @@ class WCFSetup extends WCF {
                if (!empty(self::$directories)) {
                        $applicationPaths = $knownPaths = [];
                        
-                       // use $showOrder instead of $applications to ensure that the error message for
-                       // duplicate directories will trigger in display order rather than the random
-                       // sort order returned by glob() above
+                       // use $showOrder to ensure that the error message for duplicate directories
+                       // will trigger in display order rather than the random sort order returned
+                       // by glob() above
                        foreach ($showOrder as $application) {
                                $path = FileUtil::getRealPath($documentRoot . '/' . FileUtil::addTrailingSlash(FileUtil::removeLeadingSlash(self::$directories[$application])));
                                if (strpos($path, $documentRoot) !== 0) {
index 24f40dfdb5967e5009c0f066508590af056236a5..4c789239121ee946c7b28a56f680f48bc1be0a9d 100644 (file)
@@ -167,7 +167,6 @@ final class DOMUtil {
                $nodeList2 = self::getParents($node2, true);
                $nodeList2[] = $node2;
                
-               $commonAncestor = null;
                $i = 0;
                while ($nodeList1[$i] === $nodeList2[$i]) {
                        $i++;