diff options
Diffstat (limited to 'private')
-rw-r--r-- | private/session.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/private/session.php b/private/session.php index 9b93712..e9a2370 100644 --- a/private/session.php +++ b/private/session.php @@ -26,6 +26,7 @@ if (isset($_COOKIE['FL_SESSION_TOKEN'])) { $_USER = $_PROFILE['login'];
$_SUID = $_PROFILE['login'];
$_FULLNAME = $_PROFILE['name'];
+ $_FRENCH = $_PROFILE['locale']['name'] === "fr";
if (!in_array($_USER, $_WELCOMED)) {
header("Location: /welcome/?r=" . urlencode("https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"));
@@ -40,4 +41,13 @@ if (isset($_COOKIE['FL_SESSION_TOKEN'])) { die();
}
-$_SERVER["HTTP_USER_AGENT"] = str_replace("+AutomateCloud/", "+FamilineDesktop+AutomateCloud/", $_SERVER["HTTP_USER_AGENT"]);
\ No newline at end of file +$_SERVER["HTTP_USER_AGENT"] = str_replace("+AutomateCloud/", "+FamilineDesktop+AutomateCloud/", $_SERVER["HTTP_USER_AGENT"]);
+function l($fr, $en) {
+ global $_FRENCH;
+
+ if ($_FRENCH) {
+ return $fr;
+ } else {
+ return $en;
+ }
+}
\ No newline at end of file |