3 Commits

Author SHA1 Message Date
admin.juergen 8d4ec03253 Raise platform and dependency requirements 2026-04-17 09:58:58 +02:00
Jürgen Mummert 67442da17a Read external DB config from Dotenv environment 2026-04-01 12:13:44 +02:00
Jürgen Mummert f9df49b998 Allow evlks_access in editor field permissions 2026-04-01 12:02:50 +02:00
3 changed files with 14 additions and 7 deletions
+3 -3
View File
@@ -4,12 +4,12 @@
"type": "contao-bundle", "type": "contao-bundle",
"license": "proprietary", "license": "proprietary",
"require": { "require": {
"php": "^8.3", "php": "^8.4",
"contao/core-bundle": "^5.7", "contao/core-bundle": "^5.7",
"contao/calendar-bundle": "5.7.*", "contao/calendar-bundle": "5.7.*",
"contao/manager-plugin": "^2.0", "contao/manager-plugin": "^2.0",
"guzzlehttp/guzzle": "^7.9", "guzzlehttp/guzzle": "^7.10",
"alnv/catalog-manager-bundle": "^3.0", "alnv/catalog-manager-bundle": "^4.0",
"janborg/contao-ical-bundle": "^0.5.4" "janborg/contao-ical-bundle": "^0.5.4"
}, },
"autoload": { "autoload": {
+1 -1
View File
@@ -145,7 +145,7 @@ $dca['fields']['export'] = [
$dca['fields']['evlks_access'] = [ $dca['fields']['evlks_access'] = [
'label' => &$GLOBALS['TL_LANG']['tl_calendar_events']['evlks_access'], 'label' => &$GLOBALS['TL_LANG']['tl_calendar_events']['evlks_access'],
'exclude' => false, 'exclude' => true,
'inputType' => 'select', 'inputType' => 'select',
'options' => [ 'options' => [
1 => 'Veranstaltung in Gebaerdensprache bzw. Gebaerdendolmetscher ist anwesend', 1 => 'Veranstaltung in Gebaerdensprache bzw. Gebaerdendolmetscher ist anwesend',
+10 -3
View File
@@ -6,6 +6,13 @@ use PDO;
class ExternalLocationModel class ExternalLocationModel
{ {
private static function readEnv(string $key): string
{
$value = $_SERVER[$key] ?? $_ENV[$key] ?? getenv($key);
return is_string($value) ? trim($value) : '';
}
/** /**
* Erstellt die PDO-Verbindung zur externen Datenbank. * Erstellt die PDO-Verbindung zur externen Datenbank.
* *
@@ -13,9 +20,9 @@ class ExternalLocationModel
*/ */
private static function getConnection() private static function getConnection()
{ {
$dsn = getenv('KS_NOSSENERLAND_EXTERNAL_DB_DSN') ?: ''; $dsn = self::readEnv('KS_NOSSENERLAND_EXTERNAL_DB_DSN');
$user = getenv('KS_NOSSENERLAND_EXTERNAL_DB_USER') ?: ''; $user = self::readEnv('KS_NOSSENERLAND_EXTERNAL_DB_USER');
$password = getenv('KS_NOSSENERLAND_EXTERNAL_DB_PASSWORD') ?: ''; $password = self::readEnv('KS_NOSSENERLAND_EXTERNAL_DB_PASSWORD');
if ('' === $dsn || '' === $user) { if ('' === $dsn || '' === $user) {
throw new \PDOException('Missing external DB env vars for location lookup.'); throw new \PDOException('Missing external DB env vars for location lookup.');