Revision 702
Added by doc almost 17 years ago
class.admin.php | ||
---|---|---|
71 | 71 |
die($MESSAGE['ADMIN']['INSUFFICIENT_PRIVELLIGES']); |
72 | 72 |
} |
73 | 73 |
} |
74 |
|
|
75 |
// Check if the backend language is also the selected language. If not, send headers again. |
|
76 |
global $database; |
|
77 |
$get_user_language = @$database->query("SELECT language FROM ".TABLE_PREFIX. |
|
78 |
"users WHERE user_id = '" .(int) $this->get_user_id() ."'"); |
|
79 |
$user_language = ($get_user_language) ? $get_user_language->fetchRow() : ''; |
|
80 |
// prevent infinite loop if language file is not XX.php (e.g. DE_du.php) |
|
81 |
$user_language = substr($user_language[0],0,2); |
|
82 |
if((LANGUAGE != $user_language) && file_exists(WB_PATH .'/languages/' .$user_language .'.php')) { |
|
83 |
header('Location: '.$_SERVER['PHP_SELF'].'?lang='.$user_language); |
|
84 |
exit(); |
|
85 |
} |
|
86 |
|
|
74 | 87 |
// Auto header code |
75 | 88 |
if($auto_header == true) { |
76 | 89 |
$this->print_header(); |
Also available in: Unified diff
fixed language bug (backend language switched to the pages language viewed in frontend)