From: quix0r Date: Wed, 7 Nov 2012 19:39:30 +0000 (+0000) Subject: isExtensionOlder() is no longer required X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=205e6d0197fc297ec8621e09197dab5ba586c322;p=mailer.git isExtensionOlder() is no longer required --- diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index 013babf309..c5f03b2097 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -996,18 +996,6 @@ function doDeactivateExtension ($ext_name, $inRebuild = FALSE) { ); } -// Checks whether the extension is older than given -function isExtensionOlder ($ext_name, $ext_ver) { - // Is there cache? - if (!isset($GLOBALS[__FUNCTION__][$ext_name][$ext_ver])) { - // Determine it - $GLOBALS[__FUNCTION__][$ext_name][$ext_ver] = (version_compare(getExtensionVersion($ext_name), $ext_ver, '<') === TRUE); - } // END - if - - // Return cache - return $GLOBALS[__FUNCTION__][$ext_name][$ext_ver]; -} - // Creates a new task for updated extension function createExtensionUpdateTask ($adminId, $ext_name, $ext_ver, $notes) { // Create subject line diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 3cb8113529..c8b651cf21 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -776,7 +776,7 @@ function isExtensionInstalledAndOlder ($ext_name, $ext_ver) { // Is an cache entry found? if (!isset($GLOBALS[__FUNCTION__][$ext_name][$ext_ver])) { // Determine it - $GLOBALS[__FUNCTION__][$ext_name][$ext_ver] = ((isExtensionInstalled($ext_name)) && (isExtensionOlder($ext_name, $ext_ver))); + $GLOBALS[__FUNCTION__][$ext_name][$ext_ver] = ((isExtensionInstalled($ext_name)) && (version_compare(getExtensionVersion($ext_name), $ext_ver, '<') === TRUE)); } else { // Cache hits should be incremented twice incrementStatsEntry('cache_hits', 2);