Merge origin/develop into develop

Dieser Commit ist enthalten in:
o.pinke 2021-11-23 12:57:04 +01:00
Commit 62aae45545
4 geänderte Dateien mit 45 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -56,6 +56,7 @@ FS#25 - Collision with pre-installed AMR after Migration
** History / Changelog ** ** History / Changelog **
ConLite 2.1.3
ConLite 2.1.2 ConLite 2.1.2
ConLite 2.1.1 ConLite 2.1.1
ConLite 2.1.0 ConLite 2.1.0

19
cms/environment.php Normale Datei
Datei anzeigen

@ -0,0 +1,19 @@
<?php
// Load environment config file
$configEnv = str_replace('\\', '/', realpath(dirname(__FILE__) . '/')) . '/data/config/config.environment.php';
if (file_exists($configEnv)) {
include_once($configEnv);
}
if (!defined('CL_ENVIRONMENT')) {
if (getenv('CONLITE_ENVIRONMENT')) {
define('CL_ENVIRONMENT', getenv('CONLITE_ENVIRONMENT'));
} if (getenv('CONTENIDO_ENVIRONMENT')) {
define('CL_ENVIRONMENT', getenv('CONTENIDO_ENVIRONMENT'));
} else {
define('CL_ENVIRONMENT', 'production');
}
}
//echo CL_ENVIRONMENT;

Datei anzeigen

@ -48,11 +48,32 @@ if (!defined("CON_FRAMEWORK")) {
} }
$contenido_path = ''; $contenido_path = '';
# include the config file of the frontend to init the Client and Language Id
include_once ("config.php");
# Contenido startup process // Set path to current frontend
include_once ($contenido_path . 'includes/startup.php'); $frontend_path = str_replace('\\', '/', realpath(dirname(__FILE__) . '/')) . '/';
// Include the environment definer file
include_once($frontend_path . 'environment.php');
if (defined('CL_ENVIRONMENT')) {
include_once($frontend_path . 'data/config/' . CL_ENVIRONMENT . '/config.php');
if (file_exists($frontend_path . 'data/config/' . CL_ENVIRONMENT . '/config.local.php')) {
@include($frontend_path . 'data/config/' . CL_ENVIRONMENT . '/config.local.php');
}
} else {
if(file_exists($frontend_path.'config.php')) {
include_once($frontend_path.'config.php');
}
if(file_exists($frontend_path.'config.local.php')) {
include_once($frontend_path.'config.local.php');
}
}
if (!is_file($contenido_path . 'includes/startup.php')) {
die("<h1>Fatal Error</h1><br>Couldn't include ConLite startup.");
}
include_once($contenido_path . 'includes/startup.php');
cInclude("includes", "functions.con.php"); cInclude("includes", "functions.con.php");
cInclude("includes", "functions.con2.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) // @TODO: Should be outsourced into startup process but requires a better detection (frontend or backend)
Contenido_Security::checkFrontendGlobals(); Contenido_Security::checkFrontendGlobals();
// update urlbuilder set http base path // update urlbuilder set http base path
Contenido_Url::getInstance()->getUrlBuilder()->setHttpBasePath($cfgClient[$client]['htmlpath']['frontend']); Contenido_Url::getInstance()->getUrlBuilder()->setHttpBasePath($cfgClient[$client]['htmlpath']['frontend']);
// Initialize language // Initialize language
if (!isset($lang)) { if (!isset($lang)) {
@ -227,7 +246,6 @@ $aParams = array(
); );
$errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams); $errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams);
/* /*
* Try to initialize variables $idcat, $idart, $idcatart, $idartlang * 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 * Note: These variables can be set via http globals e.g. front_content.php?idcat=41&idart=34&idcatart=35&idartlang=42