feat : FOLIO_REPO_URL et APP_TIMEZONE configurables depuis admin #67

Merged
cedricAbonnel merged 4 commits from feat/folio-repo-url-admin-config into main 2026-05-15 07:52:18 +00:00
2 changed files with 11 additions and 0 deletions
Showing only changes of commit 16afec3039 - Show all commits
+7
View File
@@ -6,6 +6,7 @@
APP_URL=https://example.com
APP_ENV=prod
APP_DEBUG=0
APP_TIMEZONE=Europe/Paris
# Authentification admin (email de l'administrateur principal)
ADMIN_EMAIL=
@@ -40,6 +41,12 @@ SMTP_FROM_NAME=
CONTACT_EMAIL=
CONTACT_FROM_EMAIL=
# Dépôt Folio pour le vérificateur de mises à jour (UpdateChecker)
# URL de base du dépôt Gitea (sans slash final)
FOLIO_REPO_URL=https://git.abonnel.fr/cedricAbonnel/folio
# Branche suivie pour les mises à jour (défaut : main)
# FOLIO_UPDATE_BRANCH=main
# Chemin absolu vers le répertoire des articles (data/)
# Par défaut : BASE_PATH/data (dans le répertoire de l'application)
# Recommandé en production : chemin hors du répertoire web, ex. /srv/data/folio
+4
View File
@@ -6,6 +6,10 @@ if (!defined('BASE_PATH')) {
define('BASE_PATH', __DIR__);
}
$__tz = $_ENV['APP_TIMEZONE'] ?? getenv('APP_TIMEZONE') ?: 'Europe/Paris';
date_default_timezone_set($__tz);
unset($__tz);
if (!defined('DATA_PATH')) {
$__dataPath = $_ENV['DATA_PATH'] ?? getenv('DATA_PATH') ?: '';
define('DATA_PATH', $__dataPath !== '' ? rtrim($__dataPath, '/') : BASE_PATH . '/data');