]> git.mxchange.org Git - mailer.git/commitdiff
isExtensionOlder() is no longer required
authorRoland Häder <roland@mxchange.org>
Wed, 7 Nov 2012 19:39:30 +0000 (19:39 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 7 Nov 2012 19:39:30 +0000 (19:39 +0000)
inc/extensions-functions.php
inc/wrapper-functions.php

index 013babf309816f88a153250986a7f888633d97f7..c5f03b20974538a99d5a601c028bbcbf7ebc0d53 100644 (file)
@@ -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
index 3cb81135295da53ba448a3553550f630b3826509..c8b651cf2196a4f1cf76eb087267ddf136b43ac8 100644 (file)
@@ -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);