Subversion Repositories ALCASAR

Rev

Rev 2775 | Rev 2800 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2775 Rev 2795
Line 48... Line 48...
48
if (isset($_GET['lang']) && (trim($_GET['lang'])!=="")
48
if (isset($_GET['lang']) && (trim($_GET['lang'])!=="")
49
   && !preg_match('/[^A-Za-z\-]/', $_GET['lang'])
49
   && !preg_match('/[^A-Za-z\-]/', $_GET['lang'])
50
   && file_exists(PSI_APP_ROOT.'/language/'.$_GET['lang'].'.xml')) {
50
   && file_exists(PSI_APP_ROOT.'/language/'.$_GET['lang'].'.xml')) {
51
    $lang = strtolower($_GET['lang']);
51
    $lang = strtolower($_GET['lang']);
52
}
52
}
-
 
53
/** ALCASAR changes
-
 
54
 *  $lang set by the web browser config
-
 
55
 *
-
 
56
 */
-
 
57
 if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
-
 
58
	$Langue	  = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
-
 
59
	$lang = strtolower(substr(chop($Langue[0]), 0, 2));
53
 
60
 
54
if (isset($_GET['plugin'])) {
61
if (isset($_GET['plugin'])) {
55
   if ((trim($_GET['plugin'])!=="") && !preg_match('/[^A-Za-z]/', $_GET['plugin'])) {
62
   if ((trim($_GET['plugin'])!=="") && !preg_match('/[^A-Za-z]/', $_GET['plugin'])) {
56
       $plugin = strtolower($_GET['plugin']);
63
       $plugin = strtolower($_GET['plugin']);
57
        if (file_exists(PSI_APP_ROOT.'/plugins/'.$plugin.'/lang/'.$lang.'.xml')) {
64
        if (file_exists(PSI_APP_ROOT.'/plugins/'.$plugin.'/lang/'.$lang.'.xml')) {