);
}
-// 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
// 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);