asdsad
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
require_once __DIR__ . '/../public/fileload.php'; // Pfad ggf. anpassen
|
||||||
|
|
||||||
|
use App\App;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EmailTemplate Bridge – Schema-API für Quellsysteme.
|
* EmailTemplate Bridge – Schema-API für Quellsysteme.
|
||||||
*
|
*
|
||||||
@@ -21,20 +27,28 @@ declare(strict_types=1);
|
|||||||
* - Der Token sollte für jede Installation eindeutig sein.
|
* - Der Token sollte für jede Installation eindeutig sein.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// 1) App-Konfiguration holen
|
||||||
|
$appConfig = App::get()->config();
|
||||||
|
|
||||||
|
// 2) Bridge-spezifische Konfiguration auf Basis der App-Config
|
||||||
$bridgeConfig = [
|
$bridgeConfig = [
|
||||||
'token' => getenv('EMAILTEMPLATE_BRIDGE_TOKEN') ?: 'kgIqdL9aNWsFWy6mhSRpnuLc1EbZ62sGCcJAwjjlqqznEGE13szhksWUan0cEdjE',
|
'token' => getenv('EMAILTEMPLATE_BRIDGE_TOKEN') ?: 'kgIqdL9aNWsFWy6mhSRpnuLc1EbZ62sGCcJAwjjlqqznEGE13szhksWUan0cEdjE',
|
||||||
'db' => [
|
'db' => [
|
||||||
'dsn' => getenv('EMAILTEMPLATE_BRIDGE_DSN') ?: 'mysql:host=127.0.0.1;dbname=d0444c25;charset=utf8mb4',
|
'dsn' => $appConfig->db['dsn'] ?? '',
|
||||||
'user' => getenv('EMAILTEMPLATE_BRIDGE_DB_USER') ?: 'd0444c25',
|
'user' => $appConfig->db['user'] ?? '',
|
||||||
'pass' => getenv('EMAILTEMPLATE_BRIDGE_DB_PASS') ?: '/7ü9+§ÄfkiQvGPr§2Op7',
|
'pass' => $appConfig->db['password'] ?? '',
|
||||||
'options' => [
|
'options' => $appConfig->db['options'] ?? [
|
||||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||||
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'tables_allow' => [], // optional whitelist: ['customers', 'orders']
|
|
||||||
|
// Optional: Tabellen-Whitelist
|
||||||
|
'tables_allow' => [], // z.B. ['customers', 'orders']
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
$localOverride = __DIR__ . '/emailtemplate.bridge.conf.php';
|
$localOverride = __DIR__ . '/emailtemplate.bridge.conf.php';
|
||||||
if (is_file($localOverride)) {
|
if (is_file($localOverride)) {
|
||||||
$override = include $localOverride;
|
$override = include $localOverride;
|
||||||
|
|||||||
Reference in New Issue
Block a user