diff options
author | Minteck <contact@minteck.org> | 2022-06-04 16:20:25 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-06-04 16:20:25 +0200 |
commit | a46bff52a39e04f63cd16602e461d791fa48b922 (patch) | |
tree | c16d18f18620ab7e68d5eb7d5b7b188f044d3a14 /private | |
parent | 7f1b2a24c86a4047aed03530eeb0cdb902ab8c4d (diff) | |
download | core-a46bff52a39e04f63cd16602e461d791fa48b922.tar.gz core-a46bff52a39e04f63cd16602e461d791fa48b922.tar.bz2 core-a46bff52a39e04f63cd16602e461d791fa48b922.zip |
Yes I fucked up
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 |