Previous fix fixed, a lot constants rewritten (unfinished)
[mailer.git] / inc / libs / theme_functions.php
index 92a2a47ac49e215c9fa14b71f8e864c4acea331f..61b32431eb70db851ccbce21dd3ed178810e5b67 100644 (file)
@@ -39,7 +39,7 @@ if (!defined('__SECURITY')) {
 
 function THEME_SELECTION_BOX($mod, $act, $wht, $result) {
        // Construction URL
-       $FORM = URL."/modules.php?module=".$mod;
+       $FORM = "{!URL!}/modules.php?module=".$mod;
        if (!empty($act)) $FORM .= "&action=".$act;
        if (!empty($wht))   $FORM .= "&what=".$wht;
        define('__FORM_VALUE', $FORM);
@@ -51,7 +51,7 @@ function THEME_SELECTION_BOX($mod, $act, $wht, $result) {
        );
 
        // Load all themes
-       while(list($theme) = SQL_FETCHROW($result)) {
+       while (list($theme) = SQL_FETCHROW($result)) {
                // Load it's theme.php file
                $INC = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($theme));
                if (FILE_READABLE($INC)) {
@@ -101,7 +101,7 @@ function THEME_GET_VERSION ($name) {
                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",
+               $result = SQL_QUERY_ESC("SELECT theme_ver FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' LIMIT 1",
                        array($name), __FILE__, __LINE__);
 
                // Entry found?
@@ -146,7 +146,7 @@ function THEME_IS_ACTIVE ($name) {
                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",
+               $result = SQL_QUERY_ESC("SELECT theme_active FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
                        array($name), __FILE__, __LINE__);
 
                // Is the theme active and installed?
@@ -182,7 +182,7 @@ function GET_CURR_THEME_NAME () {
                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",
+               $result = SQL_QUERY_ESC("SELECT theme_name FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
                        array($name), __FILE__, __LINE__);
 
                // Load theme name