]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/theme_functions.php
More complete rewrite to use wrapper function isExtensionInstalledAndNewer(), some...
[mailer.git] / inc / libs / theme_functions.php
index 2fb7de3b7f8a9b8d1a36c7c8bd45c2767fed3609..c733441a6afdd10f7f09f190da1f632f3c878645 100644 (file)
@@ -127,7 +127,7 @@ function getThemeVersion ($name) {
 
                // Count up
                incrementStatsEntry('cache_hits');
 
                // Count up
                incrementStatsEntry('cache_hits');
-       } elseif (getExtensionVersion('cache') != '0.1.8') {
+       } elseif (isExtensionInstalledAndNewer('cache', '0.1.8')) {
                // Load version from database
                $result = SQL_QUERY_ESC("SELECT `theme_ver` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_path`='%s' LIMIT 1",
                        array($name), __FUNCTION__, __LINE__);
                // Load version from database
                $result = SQL_QUERY_ESC("SELECT `theme_ver` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_path`='%s' LIMIT 1",
                        array($name), __FUNCTION__, __LINE__);
@@ -170,7 +170,7 @@ function isThemeActive ($name) {
 
                // Count up
                incrementStatsEntry('cache_hits');
 
                // Count up
                incrementStatsEntry('cache_hits');
-       } elseif (getExtensionVersion('cache') != '0.1.8') {
+       } elseif (isExtensionInstalledAndNewer('cache', '0.1.8')) {
                // Check if current theme is already imported or not
                $result = SQL_QUERY_ESC("SELECT `theme_active` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_path`='%s' AND `theme_active`='Y' LIMIT 1",
                        array($name), __FUNCTION__, __LINE__);
                // Check if current theme is already imported or not
                $result = SQL_QUERY_ESC("SELECT `theme_active` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_path`='%s' AND `theme_active`='Y' LIMIT 1",
                        array($name), __FUNCTION__, __LINE__);
@@ -204,7 +204,7 @@ function getCurrentThemeName () {
 
                // Count up
                incrementStatsEntry('cache_hits');
 
                // Count up
                incrementStatsEntry('cache_hits');
-       } elseif (getExtensionVersion('cache') != '0.1.8') {
+       } elseif (isExtensionInstalledAndNewer('cache', '0.1.8')) {
                // Check if current theme is already imported or not
                $result = SQL_QUERY_ESC("SELECT `theme_name` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_path`='%s' AND `theme_active`='Y' LIMIT 1",
                        array($name), __FUNCTION__, __LINE__);
                // Check if current theme is already imported or not
                $result = SQL_QUERY_ESC("SELECT `theme_name` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_path`='%s' AND `theme_active`='Y' LIMIT 1",
                        array($name), __FUNCTION__, __LINE__);