X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flanguage-functions.php;h=479848e75c1782dbc00fe61e309d0d86b116dcc2;hb=481c2f9be33eaf1565217b12b3a90b75b5a52ecd;hp=f2fe7a9536d422c83e12a0a6c2a53c94b503b724;hpb=a2ca374f65976d21651fffb64a78d3a9678bb3b8;p=mailer.git diff --git a/inc/language-functions.php b/inc/language-functions.php index f2fe7a9536..479848e75c 100644 --- a/inc/language-functions.php +++ b/inc/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,