]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/theme_functions.php
Global removed on many places, rewritten to use incrementConfigEntry()
[mailer.git] / inc / libs / theme_functions.php
index db1eb19ee1319380a08142022627c99ef93a9756..0169427c732fbd194ce85e069fa677035cfd0a5d 100644 (file)
@@ -81,7 +81,7 @@ function THEME_SELECTION_BOX($mod, $act, $wht, $result) {
 
 // Get version from name
 function THEME_GET_VERSION ($name) {
-       global $cacheArray, $_CONFIG;
+       global $cacheArray;
 
        // Is the extension "theme" installed?
        if (!EXT_IS_ACTIVE("theme")) {
@@ -98,7 +98,7 @@ function THEME_GET_VERSION ($name) {
                $cver = $cacheArray['themes']['theme_ver'][$name];
 
                // Count up
-               if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
+               incrementConfigEntry('cache_hits');
        } elseif (GET_EXT_VERSION("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",
@@ -126,7 +126,7 @@ function THEME_CHECK_EXIST ($name) {
 
 // Checks if a theme is active
 function THEME_IS_ACTIVE ($name) {
-       global $cacheArray, $_CONFIG;
+       global $cacheArray;
 
        // Is the extension "theme" installed?
        if (!EXT_IS_ACTIVE("theme")) {
@@ -143,7 +143,7 @@ function THEME_IS_ACTIVE ($name) {
                $active = ($cacheArray['themes']['theme_active'][$name] == "Y");
 
                // Count up
-               if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
+               incrementConfigEntry('cache_hits');
        } elseif (GET_EXT_VERSION("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",
@@ -162,7 +162,7 @@ function THEME_IS_ACTIVE ($name) {
 
 // Gets current human-readable theme name
 function GET_CURR_THEME_NAME () {
-       global $cacheArray, $_CONFIG;
+       global $cacheArray;
 
        // Is the extension "theme" installed?
        if (!EXT_IS_ACTIVE("theme")) {
@@ -179,7 +179,7 @@ function GET_CURR_THEME_NAME () {
                $name = $cacheArray['themes']['theme_name'][$name];
 
                // Count up
-               if (getConfig('cache_hits') > 0) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
+               incrementConfigEntry('cache_hits');
        } elseif (GET_EXT_VERSION("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",