Skip to content
Code-Schnipsel Gruppen Projekte
Commit fb0eed63 erstellt von Florian Bogner's avatar Florian Bogner
Dateien durchsuchen

fix: Cronservice will now try to use the vhost as domain instead of the host in the config files

Übergeordneter 7bb960e3
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -14,7 +14,9 @@ class CronService
private $https;
private $packageDir;
/**
* CronService constructor.
*/
public function __construct()
{
$host = QUI::$Conf->get("globals", "host");
......@@ -22,18 +24,31 @@ class CronService
$opt_dir = QUI::$Conf->get("globals", "opt_dir");
$url_dir = QUI::$Conf->get("globals", "url_dir");
// Parse Domain and protocol
if (strpos($host, "https://") !== false) {
$this->https = true;
$this->domain = str_replace("https://", "", $host);
} elseif (strpos($host, "http://") !== false) {
$this->https = false;
$this->domain = str_replace("http://", "", $host);
} else {
$this->https = false;
$this->domain = $host;
// VHost Domain
$vhost = QUI::getProjectManager()->getStandard()->getVHost(true, true);
$this->domain = $vhost;
// Check if https should be used.
if (substr($vhost, 0, 8) == 'https://') {
$this->https = true;
}
// Read the domain from the config file if no vhost could be detected.
if (empty($vhost)) {
// Parse Domain and protocol
if (strpos($host, "https://") !== false) {
$this->https = true;
$this->domain = str_replace("https://", "", $host);
} elseif (strpos($host, "http://") !== false) {
$this->https = false;
$this->domain = str_replace("http://", "", $host);
} else {
$this->https = false;
$this->domain = $host;
}
}
// Parse Package dir
$this->packageDir = $url_dir . str_replace($cms_dir, "", $opt_dir);
}
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren