diff options
-rw-r--r-- | .idea/workspace.xml | 20 | ||||
-rw-r--r-- | app/session.php | 10 | ||||
-rw-r--r-- | private/session.php | 12 |
3 files changed, 33 insertions, 9 deletions
diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b40ebdf..baae3dc 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -61,6 +61,8 @@ <change beforePath="$PROJECT_DIR$/app/genealogy/styles/dark.css" beforeDir="false" afterPath="$PROJECT_DIR$/app/genealogy/styles/dark.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/genealogy/tree/index.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/genealogy/tree/index.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/genealogy/tree/mktree.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/genealogy/tree/mktree.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/app/session.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/session.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/private/session.php" beforeDir="false" afterPath="$PROJECT_DIR$/private/session.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -80,7 +82,7 @@ </option>
</component>
<component name="Git.Settings">
- <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/app/cdn" />
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="GitSEFilterConfiguration">
<file-type-list>
@@ -104,14 +106,14 @@ <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
- <component name="PropertiesComponent"><![CDATA[{ - "keyToString": { - "WebServerToolWindowFactoryState": "true", - "last_opened_file_path": "/Users/Scoots/Code/Familine/private/news", - "nodejs_package_manager_path": "npm", - "vue.rearranger.settings.migration": "true" + <component name="PropertiesComponent">{ + "keyToString": { + "WebServerToolWindowFactoryState": "true", + "last_opened_file_path": "/Users/Scoots/Code/Familine/private/news", + "nodejs_package_manager_path": "npm", + "vue.rearranger.settings.migration": "true" } -}]]></component>
+}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/private/news" />
@@ -166,6 +168,8 @@ <workItem from="1653663350526" duration="616000" />
<workItem from="1654000587101" duration="441000" />
<workItem from="1654345612131" duration="4286000" />
+ <workItem from="1654352190298" duration="166000" />
+ <workItem from="1654352378304" duration="38000" />
</task>
<servers />
</component>
diff --git a/app/session.php b/app/session.php index 782c40e..f4acf2f 100644 --- a/app/session.php +++ b/app/session.php @@ -39,4 +39,14 @@ if (isset($_COOKIE['FL_SESSION_TOKEN'])) { } else {
header("Location: https://" . $_CONFIG["Global"]["domain"] . "/login/?r=" . urlencode("https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"));
die();
+}
+
+function l($fr, $en) {
+ global $_FRENCH;
+
+ if ($_FRENCH) {
+ return $fr;
+ } else {
+ return $en;
+ }
}
\ No newline at end of file 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 |