aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/genealogy/.gitlab-ci.yml15
-rw-r--r--app/genealogy/LICENSE21
-rw-r--r--app/genealogy/index.php2
-rw-r--r--app/genealogy/private/header.php7
-rw-r--r--app/session.php12
5 files changed, 47 insertions, 10 deletions
diff --git a/app/genealogy/.gitlab-ci.yml b/app/genealogy/.gitlab-ci.yml
new file mode 100644
index 0000000..4402674
--- /dev/null
+++ b/app/genealogy/.gitlab-ci.yml
@@ -0,0 +1,15 @@
+# Generic Minteck GitLab CI/CD Checks
+# PHP applications
+image: php:zts-buster
+
+cache:
+ paths:
+ - vendor/
+
+before_script:
+ - apt-get update
+ - apt-get install -y git
+
+test:
+ script:
+ - bash -c '[[ $(find . -name \*.php -exec php -l {} \; | grep -v "No syntax errors") ]] && exit 2 || exit 0'
diff --git a/app/genealogy/LICENSE b/app/genealogy/LICENSE
new file mode 100644
index 0000000..318113a
--- /dev/null
+++ b/app/genealogy/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2021- Minteck
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/app/genealogy/index.php b/app/genealogy/index.php
index 892e511..fa67073 100644
--- a/app/genealogy/index.php
+++ b/app/genealogy/index.php
@@ -1,6 +1,6 @@
<?php $_TITLE = "Accueil"; require_once $_SERVER['DOCUMENT_ROOT'] . "/private/header.php"; ?>
<div class="container" style="text-align: center;">
- <h1>Familine Recall</h1>
+ <h1>Familine Généalogie</h1>
<p><i>La généalogie familiale simplifiée et accessible à tous</i></p>
<h2>Pour vous</h2>
diff --git a/app/genealogy/private/header.php b/app/genealogy/private/header.php
index 665e6c0..c579fed 100644
--- a/app/genealogy/private/header.php
+++ b/app/genealogy/private/header.php
@@ -36,7 +36,7 @@ $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/private/data
<link href="/dllib/jquery.flexdatalist.min.css" rel="stylesheet" type="text/css">
<script src="/dllib/jquery.js"></script>
<script src="/dllib/org.js"></script>
- <title><?= $_TITLE ?> | Familine Recall</title>
+ <title><?= $_TITLE ?> | Familine Généalogie</title>
<style>
:root {
--primary-color: #217ca3;
@@ -94,7 +94,7 @@ $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/private/data
</head>
<body>
<nav class="navbar navbar-expand-sm bg-light navbar-light">
- <a class="navbar-brand" href="/">Familine Recall</a>
+ <a class="navbar-brand" href="/">Familine Généalogie</a>
<ul class="navbar-nav" style="width: 100%;">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
@@ -116,9 +116,6 @@ $data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/private/data
<li class="nav-item">
<a class="nav-link" href="/me">Ma famille</a>
</li>
- <li class="nav-item">
- <a class="nav-link" href="/import">Importer une généalogique</a>
- </li>
</ul>
<span class="navbar-text" style="width:100%;text-align:right;">
diff --git a/app/session.php b/app/session.php
index fc088c1..10db146 100644
--- a/app/session.php
+++ b/app/session.php
@@ -3,10 +3,14 @@
global $_CONFIG;
$_CONFIG = json_decode(file_get_contents("/mnt/familine/private/FamilineConfig.json"), true);
+global $_USER;
+global $_SUID;
+global $_FULLNAME;
+
if ($_SERVER['REMOTE_ADDR'] !== "127.0.0.1" && $_SERVER['REMOTE_ADDR'] !== "::0") {
if (isset($_COOKIE['FL_SESSION_TOKEN'])) {
if (strpos($_COOKIE['FL_SESSION_TOKEN'], ".") !== false || strpos($_COOKIE['FL_SESSION_TOKEN'], "/") !== false) {
- header("Location: https://" . $_CONFIG["Global"]["domain"] . "/welcome");
+ header("Location: https://" . $_CONFIG["Global"]["domain"] . "/login/?r=" . urlencode("https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"));
die();
}
@@ -14,7 +18,7 @@ if ($_SERVER['REMOTE_ADDR'] !== "127.0.0.1" && $_SERVER['REMOTE_ADDR'] !== "::0"
$_PROFILE = json_decode(file_get_contents("/mnt/familine/private/tokens/" . str_replace(".", "", str_replace("/", "", $_COOKIE['FL_SESSION_TOKEN']))), true);
if (isset($_PROFILE['familine'])) {
- header("Location: https://" . $_CONFIG["Global"]["domain"] . "/welcome");
+ header("Location: https://" . $_CONFIG["Global"]["domain"] . "/login/?r=" . urlencode("https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"));
die();
}
@@ -22,11 +26,11 @@ if ($_SERVER['REMOTE_ADDR'] !== "127.0.0.1" && $_SERVER['REMOTE_ADDR'] !== "::0"
$_SUID = $_PROFILE['login'];
$_FULLNAME = $_PROFILE['name'];
} else {
- header("Location: https://" . $_CONFIG["Global"]["domain"] . "/welcome");
+ header("Location: https://" . $_CONFIG["Global"]["domain"] . "/login/?r=" . urlencode("https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"));
die();
}
} else {
- header("Location: https://" . $_CONFIG["Global"]["domain"] . "/welcome");
+ header("Location: https://" . $_CONFIG["Global"]["domain"] . "/login/?r=" . urlencode("https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"));
die();
}