Commit e9b7be15 authored by okhin's avatar okhin 🚴

Fuck php5 which cannot define global arrays

parent 4862f1be
Pipeline #2347 passed with stages
in 18 seconds
...@@ -28,7 +28,7 @@ define("CTX_MODE", getenv('CTX_MODE')); ...@@ -28,7 +28,7 @@ define("CTX_MODE", getenv('CTX_MODE'));
//define("CERTIFICATE","XXXXXXXXXXXXXXXXXXXXXXXXx"); //define("CERTIFICATE","XXXXXXXXXXXXXXXXXXXXXXXXx");
//define("CTX_MODE","PRODUCTION"); //define("CTX_MODE","PRODUCTION");
define("LANGUAGES", ["fr_FR", "en_US"]); define("LANGUAGES", "fr_FR,en_US");
define("PIPLOME_PATH", getenv('PIPLOME_PATH')); define("PIPLOME_PATH", getenv('PIPLOME_PATH'));
define("PIPLOME_URL", getenv('PIPLOME_URL')); define("PIPLOME_URL", getenv('PIPLOME_URL'));
......
...@@ -40,7 +40,7 @@ class Controller ...@@ -40,7 +40,7 @@ class Controller
} }
} }
foreach (LANGUAGES as $language) { foreach (explode(',', LANGUAGES) as $language) {
foreach ($accept_languages as $accept_language) { foreach ($accept_languages as $accept_language) {
if (strpos($language, $accept_language)>=0) { if (strpos($language, $accept_language)>=0) {
$lang = $language; $lang = $language;
...@@ -49,9 +49,7 @@ class Controller ...@@ -49,9 +49,7 @@ class Controller
} }
} }
var_dump($lang);
if (!bindtextdomain("messages", "../locales/")) { if (!bindtextdomain("messages", "../locales/")) {
var_dump(bindtextdomain("messages", "../locales/"));
echo "<!-- bondtextdomain failed -->"; echo "<!-- bondtextdomain failed -->";
} }
// Language ok, set the locale environment // Language ok, set the locale environment
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment