git subrepo commit (merge) mailcow/src/mailcow-dockerized
subrepo: subdir: "mailcow/src/mailcow-dockerized"
merged: "32243e56"
upstream: origin: "https://github.com/mailcow/mailcow-dockerized.git"
branch: "master"
commit: "e2b4b6f6"
git-subrepo: version: "0.4.3"
origin: "???"
commit: "???"
Change-Id: I51e2016ef5ab88a8b0bdc08551b18f48ceef0aa5
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/prerequisites.inc.php b/mailcow/src/mailcow-dockerized/data/web/inc/prerequisites.inc.php
index 0cbd05a..a5eb2c8 100644
--- a/mailcow/src/mailcow-dockerized/data/web/inc/prerequisites.inc.php
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/prerequisites.inc.php
@@ -1,5 +1,8 @@
<?php
+// check for development mode
+$DEV_MODE = (getenv('DEV_MODE') == 'y');
+
// Slave does not serve UI
/* if (!preg_match('/y|yes/i', getenv('MASTER'))) {
header('Location: /SOGo', true, 307);
@@ -169,7 +172,9 @@
return false;
}
}
-set_exception_handler('exception_handler');
+if(!$DEV_MODE) {
+ set_exception_handler('exception_handler');
+}
// TODO: Move function
function get_remote_ip() {
@@ -242,6 +247,7 @@
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.transports.inc.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/init_db.inc.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/triggers.inc.php';
+require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/twig.inc.php';
init_db_schema();
if (isset($_SESSION['mailcow_cc_role'])) {
// if ($_SESSION['mailcow_cc_role'] == 'user') {