Unlock of booked URLs in surfbar added, fix for URL-encoded links in loader module
[mailer.git] / inc / functions.php
index 8875dc134d41276bbe3eadd43b56c92eea7db455..0f4f995d6d2124d2ba368fc2164604d3d6b702fd 100644 (file)
@@ -198,6 +198,9 @@ function LOAD_TEMPLATE($template, $return=false, $content="") {
        // Add more variables which you want to use in your template files
        global $DATA, $_CONFIG, $username;
 
+       // Make all template names lowercase
+       $template = strtolower($template);
+
        // Count the template load
        if (!isset($_CONFIG['num_templates'])) $_CONFIG['num_templates'] = 0;
        $_CONFIG['num_templates']++;
@@ -550,7 +553,7 @@ function TRANSLATE_COMMA ($dotted, $cut=true) {
 
 //
 function DEREFERER ($URL) {
-       $URL = URL."/modules.php?module=loader&url=".urlencode(base64_encode(gzcompress(COMPILE_CODE($URL))));
+       $URL = URL."/modules.php?module=loader&url=".urlencode(base64_encode(gzcompress($URL)));
        return $URL;
 }
 
@@ -667,6 +670,9 @@ function SET_LANGUAGE($lang) {
 function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") {
        global $DATA, $_CONFIG, $REPLACER;
 
+       // Make sure all template names are lowercase!
+       $template = strtolower($template);
+
        // Keept for backward-compatiblity (please replace these variables against our new {--CONST--} syntax!)
        $MAIN_TITLE = MAIN_TITLE; $URL = URL; $WEBMASTER = WEBMASTER;
        $surname = ""; $family = ""; $nick = ""; $sex = "N";