From 2682a4d1c7a1c11fc7c18200869f570bc65fcfde Mon Sep 17 00:00:00 2001 From: "o.pinke" Date: Thu, 28 Oct 2021 15:45:12 +0200 Subject: [PATCH] add environment stuff to frontend with fallback to old config.php --- cms/{ => data/config/production}/config.php | 0 cms/environment.php | 19 ++++++++++++ cms/front_content.php | 32 ++++++++++++++++----- 3 files changed, 44 insertions(+), 7 deletions(-) rename cms/{ => data/config/production}/config.php (100%) create mode 100644 cms/environment.php diff --git a/cms/config.php b/cms/data/config/production/config.php similarity index 100% rename from cms/config.php rename to cms/data/config/production/config.php diff --git a/cms/environment.php b/cms/environment.php new file mode 100644 index 0000000..180842c --- /dev/null +++ b/cms/environment.php @@ -0,0 +1,19 @@ +Fatal Error
Couldn't include ConLite startup."); +} +include_once($contenido_path . 'includes/startup.php'); cInclude("includes", "functions.con.php"); cInclude("includes", "functions.con2.php"); @@ -137,11 +158,9 @@ if (!isset($encoding) || !is_array($encoding) || count($encoding) == 0) { // @TODO: Should be outsourced into startup process but requires a better detection (frontend or backend) Contenido_Security::checkFrontendGlobals(); - // update urlbuilder set http base path Contenido_Url::getInstance()->getUrlBuilder()->setHttpBasePath($cfgClient[$client]['htmlpath']['frontend']); - // Initialize language if (!isset($lang)) { @@ -227,7 +246,6 @@ $aParams = array( ); $errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams); - /* * Try to initialize variables $idcat, $idart, $idcatart, $idartlang * Note: These variables can be set via http globals e.g. front_content.php?idcat=41&idart=34&idcatart=35&idartlang=42