44,11 → 44,9 |
if (defined('PSI_DEFAULT_LANG')) { |
$lang = PSI_DEFAULT_LANG; |
} |
|
if (isset($_GET['lang']) && (trim($_GET['lang'])!=="") |
&& !preg_match('/[^A-Za-z\-]/', $_GET['lang']) |
&& file_exists(PSI_APP_ROOT.'/language/'.$_GET['lang'].'.xml')) { |
$lang = strtolower($_GET['lang']); |
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
$lang = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); |
$lang = strtolower(substr(chop($lang[0]), 0, 2)); |
} |
/** ALCASAR changes |
* $lang set by the web browser config |
58,6 → 56,12 |
$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); |
$lang = strtolower(substr(chop($Langue[0]), 0, 2)); |
|
//if (isset($_GET['lang']) && (trim($_GET['lang'])!=="") |
// && !preg_match('/[^A-Za-z\-]/', $_GET['lang']) |
// && file_exists(PSI_APP_ROOT.'/language/'.$_GET['lang'].'.xml')) { |
// $lang = strtolower($_GET['lang']); |
//} |
|
if (isset($_GET['plugin'])) { |
if ((trim($_GET['plugin'])!=="") && !preg_match('/[^A-Za-z]/', $_GET['plugin'])) { |
$plugin = strtolower($_GET['plugin']); |