add new config var _useHomeAsRootFolder

This commit is contained in:
Uwe Steinmann 2020-12-18 08:06:01 +01:00
parent 613d234d86
commit 4708e8b393
3 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,8 @@ class Settings { /* {{{ */
var $_guestID = 2;
// ID of root-folder
var $_rootFolderID = 1;
// use home folder as root-folder
var $_useHomeAsRootFolder = false;
// If you want anybody to login as guest, set the following line to true
var $_enableGuestLogin = false;
// If you even want guest to be logged in automatically, set the following to true
@ -664,6 +666,7 @@ class Settings { /* {{{ */
$tab = $node[0]->attributes();
$this->_siteDefaultPage = strval($tab["siteDefaultPage"]);
$this->_rootFolderID = intval($tab["rootFolderID"]);
$this->_useHomeAsRootFolder = Settings::boolval($tab["useHomeAsRootFolder"]);
$this->_titleDisplayHack = Settings::boolval($tab["titleDisplayHack"]);
$this->_showMissingTranslations = Settings::boolval($tab["showMissingTranslations"]);
}
@ -1003,6 +1006,7 @@ class Settings { /* {{{ */
$node = $this->getXMLNode($xml, '/configuration/advanced', 'display');
$this->setXMLAttributValue($node, "siteDefaultPage", $this->_siteDefaultPage);
$this->setXMLAttributValue($node, "rootFolderID", $this->_rootFolderID);
$this->setXMLAttributValue($node, "useHomeAsRootFolder", $this->_useHomeAsRootFolder);
$this->setXMLAttributValue($node, "titleDisplayHack", $this->_titleDisplayHack);
$this->setXMLAttributValue($node, "showMissingTranslations", $this->_showMissingTranslations);

View File

@ -179,6 +179,7 @@ if ($action == "saveSettings")
// SETTINGS -ADVANCED - DISPLAY
$settings->_siteDefaultPage = $_POST["siteDefaultPage"];
$settings->_rootFolderID = intval($_POST["rootFolderID"]);
$settings->_useHomeAsRootFolder = getBoolValue($_POST["useHomeAsRootFolder"]);
$settings->_titleDisplayHack = getBoolValue("titleDisplayHack");
$settings->_showMissingTranslations = getBoolValue("showMissingTranslations");

View File

@ -436,6 +436,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
<?php $this->showConfigHeadline('settings_Display'); ?>
<?php $this->showConfigText('settings_siteDefaultPage', 'siteDefaultPage'); ?>
<?php $this->showConfigText('settings_rootFolderID', 'rootFolderID'); ?>
<?php $this->showConfigCheckbox('settings_useHomeAsRootFolder', 'useHomeAsRootFolder'); ?>
<?php $this->showConfigCheckbox('settings_titleDisplayHack', 'titleDisplayHack'); ?>
<?php $this->showConfigCheckbox('settings_showMissingTranslations', 'showMissingTranslations'); ?>