From 223a31224b9c140c9369358b6978c55ef289fde1 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 12 Feb 2025 11:22:43 +0200 Subject: hotfix: Replace environment variables with php global constants --- apache/sites/nowayforward_human.conf.tpl | 10 ---------- constants.php | 13 +++++++++++++ controllers/archive.php | 3 ++- controllers/meta.php | 2 ++ models/database.php | 23 ++++++++++++++++------- views/global/router.php | 2 ++ views/list/export/index.php | 3 ++- 7 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 constants.php diff --git a/apache/sites/nowayforward_human.conf.tpl b/apache/sites/nowayforward_human.conf.tpl index 059a678..7c462e2 100644 --- a/apache/sites/nowayforward_human.conf.tpl +++ b/apache/sites/nowayforward_human.conf.tpl @@ -9,19 +9,9 @@ - # Database - SetEnv SERVER ${SERVER} - SetEnv PORT ${PORT} - SetEnv USER ${USER} - SetEnv PASSWORD ${PASSWORD} - SetEnv MYSQL_UNIX_SOCKET ${MYSQL_UNIX_SOCKET} - # 5 minutes TimeOut 300 - # Project - SetEnv ARCHIVES_DIR ${ARCHIVES_DIR} - RewriteEngine On RewriteCond %{HTTP:Authorization} ^(.*) diff --git a/constants.php b/constants.php new file mode 100644 index 0000000..267d6f7 --- /dev/null +++ b/constants.php @@ -0,0 +1,13 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); diff --git a/views/global/router.php b/views/global/router.php index ab3a0be..894af6b 100644 --- a/views/global/router.php +++ b/views/global/router.php @@ -1,5 +1,7 @@