]> git.mxchange.org Git - mailer.git/blobdiff - inc/language-functions.php
Handling of empty results
[mailer.git] / inc / language-functions.php
index f2fe7a9536d422c83e12a0a6c2a53c94b503b724..906a78dc9766992f0e657e99b3ed492c05416464 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 08/25/2003 *
- * ===============                              Last change: 11/29/2005 *
+ * Mailer v0.2.1-FINAL                                Start: 08/25/2003 *
+ * ===================                          Last change: 11/29/2005 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : language-functions.php                           *
@@ -122,8 +122,8 @@ function getLanguage () {
 
 // "Setter" for language
 function setLanguage ($lang) {
-       // Accept only first 2 chars!
-       $lang = substr(SQL_ESCAPE(secureString($lang)), 0, 2);
+       // Accept only first 2 chars and still secure them
+       $lang = substr(secureString($lang), 0, 2);
 
        // Set cookie
        setSession('mx_lang', $lang);
@@ -180,7 +180,7 @@ function loadLanguageFile ($ext_name = 'none') {
        if (isLanguageIncludeReadable($ext_name)) {
                // Load language file
                loadLanguageInclude($ext_name);
-       } elseif ((isDebugModeEnabled()) && (getOutputMode() == 0) && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) {
+       } elseif ((isDebugModeEnabled()) && (getOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) {
                // No language file is not so good...
                logDebugMessage(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no language file or we cannot read from it. lang=%s, mode=%s",
                        $ext_name,