]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/theme_functions.php
Some typos fixed
[mailer.git] / inc / libs / theme_functions.php
index db1eb19ee1319380a08142022627c99ef93a9756..a39bdff3a81aa7d0332a7545cec06f6a34cc06b7 100644 (file)
@@ -68,9 +68,9 @@ function THEME_SELECTION_BOX($mod, $act, $wht, $result) {
        // Construct selection form for the box template
        $OUT = "";
        foreach ($THEMES['theme_unix'] as $key => $theme) {
-               $OUT .= "  <OPTION value=\"".$theme."\"";
+               $OUT .= "  <option value=\"".$theme."\"";
                if ($theme == GET_CURR_THEME()) $OUT .= " selected=\"selected\"";
-               $OUT .= ">".$THEMES['theme_name'][$key]."</OPTION>\n";
+               $OUT .= ">".$THEMES['theme_name'][$key]."</option>\n";
        } // END - foreach
 
        // Return generated selection
@@ -81,16 +81,16 @@ 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")) {
                // Then abort here
-               return "0.0";
+               return "!.!";
        } // END - if
 
        // Default version "number"
-       $cver = "-.-";
+       $cver = "?.?";
 
        // Is the cache entry there?
        if (isset($cacheArray['themes']['theme_ver'][$name])) {
@@ -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",
@@ -205,7 +205,7 @@ if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $currTheme)) {
        $newTheme = $_POST['new_theme'];
 
        // Change to new theme
-       set_session("mxchange_theme", $newTheme);
+       set_session('mxchange_theme', $newTheme);
 
        // Remove current from array and set new
        $theme = sprintf("%stheme/%s/theme.php", PATH, $currTheme);