add baseUrl for those cases where seeddms cannot determine the host and protocol itself

This commit is contained in:
Uwe Steinmann 2023-01-26 13:29:46 +01:00
parent 970622564c
commit b495fd248b
3 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,8 @@ class Settings { /* {{{ */
var $_coreDir = null;
// Path to SeedDMS_Lucene
var $_luceneClassDir = null;
// The base URL without _httpRoot
var $_baseUrl = "";
// The relative path in the URL, after the domain part.
var $_httpRoot = "/seeddms/";
// Where the uploaded files are stored (best to choose a directory that
@ -565,6 +567,7 @@ class Settings { /* {{{ */
if($node) {
$tab = $node[0]->attributes();
$this->_rootDir = strval($tab["rootDir"]);
$this->_baseUrl = strval($tab["baseUrl"]);
$this->_httpRoot = strval($tab["httpRoot"]);
$this->_contentDir = strval($tab["contentDir"]);
if($this->_contentDir && substr($this->_contentDir, -1, 1) != DIRECTORY_SEPARATOR)
@ -935,6 +938,7 @@ class Settings { /* {{{ */
$this->getXMLNode($xml, '/configuration', 'system');
$node = $this->getXMLNode($xml, '/configuration/system', 'server');
$this->setXMLAttributValue($node, "rootDir", $this->_rootDir);
$this->setXMLAttributValue($node, "baseUrl", $this->_baseUrl);
$this->setXMLAttributValue($node, "httpRoot", $this->_httpRoot);
$this->setXMLAttributValue($node, "contentDir", $this->_contentDir);
$this->setXMLAttributValue($node, "cacheDir", $this->_cacheDir);

View File

@ -167,6 +167,7 @@ if ($action == "saveSettings")
// SETTINGS - SYSTEM - SERVER
setDirValue("rootDir");
setStrValue("baseUrl");
setStrValue("httpRoot");
setDirValue("contentDir");
setDirValue("cacheDir");

View File

@ -407,6 +407,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
-->
<?php $this->showConfigHeadline('settings_Server'); ?>
<?php $this->showConfigText('settings_rootDir', 'rootDir'); ?>
<?php $this->showConfigText('settings_baseUrl', 'baseUrl'); ?>
<?php $this->showConfigText('settings_httpRoot', 'httpRoot'); ?>
<?php $this->showConfigText('settings_contentDir', 'contentDir'); ?>
<?php $this->showConfigText('settings_backupDir', 'backupDir'); ?>