MDL-22015 fixed more string_manager encapsulation issues - string format conversion scripts

This commit is contained in:
Petr Skoda 2010-04-14 14:48:12 +00:00
parent 96de38c3ab
commit 15a17d3504
2 changed files with 4 additions and 9 deletions

View File

@ -32,11 +32,7 @@ require_once('../../../../config.php');
$lang = optional_param('elanguage', 'en', PARAM_SAFEDIR);
$theme = optional_param('etheme', 'advanced', PARAM_SAFEDIR);
if ($lang === 'en') {
//ok
} else if (file_exists($CFG->langotherroot .'/'. $lang)) {
//$lang = $lang;
} else {
if (!get_string_manager()->translation_exists($lang, false)) {
$lang = 'en';
}

View File

@ -6,11 +6,10 @@ require("../../../../../config.php");
$lang = required_param('elanguage', PARAM_SAFEDIR);
if (file_exists("$CFG->dataroot/lang/$lang") or file_exists("$CFG->dirroot/lang/$lang")) {
$SESSION->lang = $lang;
} else if (file_exists("$CFG->dataroot/lang/{$lang}") or file_exists("$CFG->dirroot/lang/{$lang}")) {
$SESSION->lang = $lang;
if (!get_string_manager()->translation_exists($lang, false)) {
$lang = 'en';
}
$SESSION->lang = $lang;
$langmapping = array('cs'=>'cz', 'pt_br'=>'pt-br');