diff --git a/.gitignore b/.gitignore index 2dbd9da..4c0f15d 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,8 @@ Thumbs.db .idea/ .vscode/ +# Environnement local de développement (exclu de Git) +/.dev +/.env +/.env.local + diff --git a/public/index.php b/public/index.php index af2f208..4dadb83 100644 --- a/public/index.php +++ b/public/index.php @@ -19,6 +19,10 @@ $hasBranding = !empty($companyName) || !empty($companyLogo); $appVerData = file_exists(__DIR__ . '/../version.json') ? json_decode((string)file_get_contents(__DIR__ . '/../version.json'), true) : []; $appVersion = $appVerData['version'] ?? '1.5.0'; + +// Détection de l'environnement de développement : présence de .dev local ou branche git dev +$isDevEnv = file_exists(__DIR__ . '/../.dev') + || (trim((string)@shell_exec('git -C ' . escapeshellarg(__DIR__) . ' rev-parse --abbrev-ref HEAD 2>/dev/null')) === 'dev'); ?> @@ -26,7 +30,7 @@ $appVersion = $appVerData['version'] ?? '1.5.0'; -
Supervision & Téléphonie IP • Powered by Asterisk