From a28b68ea1cc1edaacb90ab813b0c69b3d37dd8be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 10 Aug 2022 11:04:51 +0200 Subject: [PATCH] Remove PackageInstallationDispatcher::compareSetting() This method existed for use with validatePHPRequirements(). --- .../PackageInstallationDispatcher.class.php | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index f2eaf94cd8..e3357287d7 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -1214,38 +1214,6 @@ class PackageInstallationDispatcher } } - /** - * Compares settings, converting values into compareable ones. - * - * @param string $setting - * @param string $value - * @param mixed $compareValue - * @return bool - */ - protected static function compareSetting($setting, $value, $compareValue) - { - if ($compareValue === false) { - return false; - } - - $value = \mb_strtolower($value); - $trueValues = ['1', 'on', 'true']; - $falseValues = ['0', 'off', 'false']; - - // handle values considered as 'true' - if (\in_array($value, $trueValues)) { - return $compareValue ? true : false; - } // handle values considered as 'false' - elseif (\in_array($value, $falseValues)) { - return (!$compareValue) ? true : false; - } elseif (!\is_numeric($value)) { - $compareValue = self::convertShorthandByteValue($compareValue); - $value = self::convertShorthandByteValue($value); - } - - return ($compareValue >= $value) ? true : false; - } - /** * Converts shorthand byte values into an integer representing bytes. * -- 2.20.1