diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 3b14e6889..230ed9465 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -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); diff --git a/op/op.Settings.php b/op/op.Settings.php index 5a45bef32..f7bbdfaf5 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -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"); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 5733c6302..43928b1ed 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -436,6 +436,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) showConfigHeadline('settings_Display'); ?> showConfigText('settings_siteDefaultPage', 'siteDefaultPage'); ?> showConfigText('settings_rootFolderID', 'rootFolderID'); ?> +showConfigCheckbox('settings_useHomeAsRootFolder', 'useHomeAsRootFolder'); ?> showConfigCheckbox('settings_titleDisplayHack', 'titleDisplayHack'); ?> showConfigCheckbox('settings_showMissingTranslations', 'showMissingTranslations'); ?>