mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2026-06-03 06:34:40 -04:00
Re #11 - start working on an api
Also some locale negotiator bugfixes & it is now possible to serialize Service and Incident classess to JSON
This commit is contained in:
@@ -279,6 +279,8 @@ class LocaleNegotiator
|
||||
$best_match = false;
|
||||
//So we have also lang code as value
|
||||
$accepted_langs = array_flip($this->accepted_langs);
|
||||
|
||||
global $lang;
|
||||
foreach ($langs as $lang) {
|
||||
if (strlen($lang)>2){
|
||||
if (in_array($lang, $accepted_langs)){
|
||||
@@ -292,7 +294,9 @@ class LocaleNegotiator
|
||||
});
|
||||
|
||||
if (count($possible)){
|
||||
$best_match = $possible[0];
|
||||
foreach ($possible as $value) {
|
||||
$best_match = $value;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user