summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7888c57)
raw | patch | inline | side by side (parent: 7888c57)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Dec 2007 06:34:40 +0000 (06:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Dec 2007 06:34:40 +0000 (06:34 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@8003 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions.inc | patch | blob | history |
diff --git a/include/functions.inc b/include/functions.inc
index 216d04149622acf0d9f3d91c8af0d0bda9908378..e46df87dc7a07c11b7368d555570b5ee383e7344 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
/* Try to use users primary language */
global $config;
$ui= get_userinfo();
- if ($ui != NULL){
+ if (isset($ui) && $ui !== NULL){
if ($ui->language != ""){
return ($ui->language.".UTF-8");
}
}
- /* Try to use users primary language */
- if ($ui != NULL){
- if ($ui->language != ""){
- return ($ui->language.".UTF-8");
+ /* Check for global language settings in gosa.conf */
+ if(isset($config->data['MAIN']['LANG']) && !empty($config->data['MAIN']['LANG'])) {
+ $lang = $config->data['MAIN']['LANG'];
+ if(!preg_match("/utf/i",$lang)){
+ $lang .= ".UTF-8";
}
+ return($lang);
}
/* Load supported languages */