]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/theme_functions.php
Even more fixes for SQL problems :-(
[mailer.git] / inc / libs / theme_functions.php
index 2fb7de3b7f8a9b8d1a36c7c8bd45c2767fed3609..2279e5741fdfb5adf53b55b50b095872f7bb9b80 100644 (file)
@@ -72,7 +72,7 @@ FROM
        `{?_MYSQL_PREFIX?}_themes`
 ".$add."
 ORDER BY
-       `theme_name` ASC", __FILE__, __LINE__);
+       `theme_name` ASC", __FUNCTION__, __LINE__);
 
        // Load all themes
        while ($content = SQL_FETCHARRAY($result)) {
@@ -127,7 +127,7 @@ function getThemeVersion ($name) {
 
                // 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__);
@@ -170,7 +170,7 @@ function isThemeActive ($name) {
 
                // 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__);
@@ -204,7 +204,7 @@ function getCurrentThemeName () {
 
                // 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__);
@@ -331,7 +331,7 @@ function FILTER_SET_USERS_THEME () {
        // Is the user data valid?
        if (!isMember()) {
                // Do only run for logged in members
-               debug_report_bug('Please only run this filter for logged in users.');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.');
        } // END - if
 
        // Change to new theme