Skip to content
Snippets Groups Projects
Commit 332178ac authored by enured's avatar enured
Browse files

B13562. Place to set default from baseUrl is now changed from DatabaseUpdate...

B13562. Place to set default from baseUrl is now changed from DatabaseUpdate to Config file and code is costumized.
parent 9c3389ff
No related branches found
No related tags found
2 merge requests!403Button is seperated in own div with class row and col-md-12. Now it will be...,!384B13562. Place to set default from baseUrl is now changed from DatabaseUpdate...
Pipeline #6651 passed
......@@ -15,6 +15,7 @@ use IMATHUZH\Qfq\Core\Helper\OnArray;
use IMATHUZH\Qfq\Core\Helper\OnString;
use IMATHUZH\Qfq\Core\Helper\Path;
use IMATHUZH\Qfq\Core\Helper\Support;
use IMATHUZH\Qfq\Core\Typo3\T3Handler;
/**
* Class Config
......@@ -98,6 +99,18 @@ class Config {
$config = array_merge($configT3qfq, $config);
}
// Set default from baseUrl if not given
if($config[SYSTEM_BASE_URL] === ''){
$fullUrl = parse_url($_SERVER["SCRIPT_URI"]);
$fullUrl['sections'] = explode('/', $fullUrl['path']);
$baseUrl = $fullUrl['scheme'].'://'.$fullUrl['host'];
for($i = 1; $i < sizeof($fullUrl['sections']) -1; $i++){
$baseUrl .= '/'.$fullUrl['sections'][$i];
}
T3Handler::updateT3QfqConfig(SYSTEM_BASE_URL, $baseUrl); //Legacy behaviour.
$config[SYSTEM_BASE_URL] = $baseUrl;
}
$config = self::renameConfigElements($config);
$config = self::setDefaults($config);
self::checkDeprecated($config);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment