fix : APP_TIMEZONE configurable (défaut Europe/Paris), FOLIO_REPO_URL dans .env.example
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user