feat : DATA_PATH configurable, DataGit auto-commit, UpdateChecker branche (v1.4.0)
- DATA_PATH : chemin /data hors document root, configurable via .env (fallback sur BASE_PATH/data si absent) - DataGit : auto-commit git sur toutes les écritures articles/livres (create, update, delete, meta, tags, fichiers, liens…) sauf autosave - UpdateChecker : getBranch() / getLastChecked() / clearCache(), branche configurable via FOLIO_UPDATE_BRANCH (plus de main hardcodé) - Admin dashboard : affiche la branche suivie, date du dernier contrôle, bouton Vérifier pour forcer le check sans attendre le TTL - CLAUDE.md : architecture DATA_PATH et flux de déploiement documentés Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,12 @@ if (!defined('BASE_PATH')) {
|
||||
define('BASE_PATH', __DIR__);
|
||||
}
|
||||
|
||||
if (!defined('DATA_PATH')) {
|
||||
$__dataPath = $_ENV['DATA_PATH'] ?? getenv('DATA_PATH') ?: '';
|
||||
define('DATA_PATH', $__dataPath !== '' ? rtrim($__dataPath, '/') : BASE_PATH . '/data');
|
||||
unset($__dataPath);
|
||||
}
|
||||
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
$isHttps = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off';
|
||||
$sessionName = $_ENV['SESSION_NAME'] ?? (getenv('SESSION_NAME') ?: null);
|
||||
|
||||
Reference in New Issue
Block a user