Compare commits
2 Commits
5bdaa5fa6e
...
dfaa8ba7a8
| Author | SHA1 | Date | |
|---|---|---|---|
| dfaa8ba7a8 | |||
| ed5bd6f998 |
+14
-1
@@ -1,3 +1,16 @@
|
||||
# Zorg dat omgevingsspecifieke bestanden nooit worden overschreven bij merges tussen dev en main
|
||||
# Automatische detectie van tekstbestanden en consistente line endings (LF)
|
||||
* text=auto eol=lf
|
||||
|
||||
# Binaire bestanden
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.ico binary
|
||||
*.pdf binary
|
||||
*.woff binary
|
||||
*.woff2 binary
|
||||
|
||||
# Sluit repository metadata uit bij release archieven
|
||||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
||||
|
||||
+27
-12
@@ -69,22 +69,37 @@ if (!function_exists('fociz_env')) {
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// 2. CENTRALE DATABASE CONFIGURATIE (DE ENIGE BRON VAN WAARHEID)
|
||||
// =========================================================================
|
||||
define('DB_HOST', fociz_env('DB_HOST', '192.168.2.33'));
|
||||
define('DB_PORT', fociz_env('DB_PORT', '3306'));
|
||||
define('DB_NAME', fociz_env('DB_NAME', 'fociz'));
|
||||
define('DB_USER', fociz_env('DB_USER', 'focizlive_user'));
|
||||
define('DB_PASS', fociz_env('DB_PASS', 'F0c1z_Live_Secure_2026!'));
|
||||
define('DB_CHARSET', 'utf8mb4');
|
||||
|
||||
// =========================================================================
|
||||
// 3. APPLICATIE INSTELLINGEN & OMGEVING
|
||||
// 2. APPLICATIE INSTELLINGEN & OMGEVINGSDETECTIE
|
||||
// =========================================================================
|
||||
define('APP_NAME', 'Fociz');
|
||||
define('APP_ENV', fociz_env('APP_ENV', 'live')); // 'live' of 'development'
|
||||
|
||||
// Automatische omgevingsdetectie:
|
||||
// 1. Expliciete .env variabele 'APP_ENV'
|
||||
// 2. Automatisch 'development' indien hostname 'dev.' of 'localhost' bevat
|
||||
// 3. Standaard 'live'
|
||||
$detectedHost = $_SERVER['HTTP_HOST'] ?? '';
|
||||
$isDevHost = (
|
||||
str_contains($detectedHost, 'dev.') ||
|
||||
str_contains($detectedHost, 'localhost') ||
|
||||
str_contains($detectedHost, '127.0.0.1')
|
||||
);
|
||||
$defaultEnv = $isDevHost ? 'development' : 'live';
|
||||
define('APP_ENV', fociz_env('APP_ENV', $defaultEnv));
|
||||
define('APP_SECRET', fociz_env('APP_SECRET', 'fociz-maria-db-super-secret-key-998877'));
|
||||
|
||||
// =========================================================================
|
||||
// 3. CENTRALE DATABASE CONFIGURATIE (OMGEVINGSAFHANKELIJK & GIT-VEILIG)
|
||||
// =========================================================================
|
||||
// Leest eerst eventuele .env variabelen (die per server uniek en gitignored zijn).
|
||||
// Indien niet ingesteld via .env, wordt automatisch de juiste database gekozen op basis van APP_ENV.
|
||||
$isDevEnv = (APP_ENV === 'development');
|
||||
define('DB_HOST', fociz_env('DB_HOST', '192.168.2.33'));
|
||||
define('DB_PORT', fociz_env('DB_PORT', '3306'));
|
||||
define('DB_NAME', fociz_env('DB_NAME', $isDevEnv ? 'focizdev' : 'fociz'));
|
||||
define('DB_USER', fociz_env('DB_USER', $isDevEnv ? 'focizdev_user' : 'focizlive_user'));
|
||||
define('DB_PASS', fociz_env('DB_PASS', $isDevEnv ? 'F0c1z_Dev_Secure_2026!' : 'F0c1z_Live_Secure_2026!'));
|
||||
define('DB_CHARSET', 'utf8mb4');
|
||||
|
||||
// Bepaal de dynamische of geconfigureerde applicatie URL
|
||||
if (!function_exists('fociz_detect_app_url')) {
|
||||
function fociz_detect_app_url(): string {
|
||||
|
||||
@@ -475,7 +475,7 @@ function microsoft_create_event(int $userId, array $eventData): array {
|
||||
'subject' => $subject,
|
||||
'body' => [
|
||||
'contentType' => 'HTML',
|
||||
'content' => nl2br(htmlspecialchars($description)) . '<br><br><small style="color: #64748b;">Aangemaakt via <a href="https://dev.fociz.nl/planner.php">Fociz Dagplanning</a></small>',
|
||||
'content' => nl2br(htmlspecialchars($description)) . '<br><br><small style="color: #64748b;">Aangemaakt via <a href="' . htmlspecialchars(defined('APP_URL') ? APP_URL : '') . '/planner.php">Fociz Dagplanning</a></small>',
|
||||
],
|
||||
'start' => [
|
||||
'dateTime' => $startDateTimeStr,
|
||||
|
||||
Reference in New Issue
Block a user