From: Matthias Schmidt Date: Sat, 30 Jul 2016 14:49:27 +0000 (+0200) Subject: Remove unused local variables X-Git-Tag: 3.0.0_Beta_1~870 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e54191ead631c37791973b20b16983b8eea374e5;p=GitHub%2FWoltLab%2FWCF.git Remove unused local variables --- diff --git a/wcfsetup/install/files/lib/acp/form/NotificationPresetSettingsForm.class.php b/wcfsetup/install/files/lib/acp/form/NotificationPresetSettingsForm.class.php index 5fd6f67824..94f5b949a6 100644 --- a/wcfsetup/install/files/lib/acp/form/NotificationPresetSettingsForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/NotificationPresetSettingsForm.class.php @@ -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 diff --git a/wcfsetup/install/files/lib/form/NotificationSettingsForm.class.php b/wcfsetup/install/files/lib/form/NotificationSettingsForm.class.php index f8b9a4f4dd..ab861cf320 100644 --- a/wcfsetup/install/files/lib/form/NotificationSettingsForm.class.php +++ b/wcfsetup/install/files/lib/form/NotificationSettingsForm.class.php @@ -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' diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index c9cb59ce00..55e84187aa 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -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/'; diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index a5b5babc22..5743ef87ae 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -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) { diff --git a/wcfsetup/install/files/lib/util/DOMUtil.class.php b/wcfsetup/install/files/lib/util/DOMUtil.class.php index 24f40dfdb5..4c78923912 100644 --- a/wcfsetup/install/files/lib/util/DOMUtil.class.php +++ b/wcfsetup/install/files/lib/util/DOMUtil.class.php @@ -167,7 +167,6 @@ final class DOMUtil { $nodeList2 = self::getParents($node2, true); $nodeList2[] = $node2; - $commonAncestor = null; $i = 0; while ($nodeList1[$i] === $nodeList2[$i]) { $i++;