From 740c4954cb98a971b29e73cd023cf9d4b7d6beaa Mon Sep 17 00:00:00 2001 From: steinm Date: Tue, 15 Mar 2011 14:19:17 +0000 Subject: [PATCH] - added new configuration variables --- inc/inc.Settings.php | 36 ++++++++++++++++++++++++++++++++++-- op/op.Settings.php | 4 ++++ out/out.Settings.php | 17 ++++++++++++++++- 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/inc/inc.Settings.php b/inc/inc.Settings.php index 5998ee1ba..184938085 100644 --- a/inc/inc.Settings.php +++ b/inc/inc.Settings.php @@ -79,13 +79,17 @@ class Settings { /* {{{ */ var $_rootDir = null; // Path to LetoDMS_Core var $_coreDir = null; - // Path to LetoDMS_Lucene - var $_luceneDir = null; // The relative path in the URL, after the domain part. var $_httpRoot = "/letodms/"; // Where the uploaded files are stored (best to choose a directory that // is not accessible through your web-server) var $_contentDir = null; + // Where the partitions of an uploaded file by the jumploader is saved + var $_stagingDir = null; + // Where the lucene fulltext index is saved + var $_luceneDir = null; + // enable/disable lucene fulltext search + var $_enableFullSearch = true; // contentOffsetDirTo var $_contentOffsetDir = "1048576"; // Maximum number of sub-directories per parent directory @@ -114,6 +118,8 @@ class Settings { /* {{{ */ var $_logFileEnable = true; // the log file rotation var $_logFileRotation = "d"; + // size of partitions for file upload by jumploader + var $_partitionSize = 2000000; // enable/disable users images var $_enableUserImage = false; // enable/disable calendar @@ -265,6 +271,7 @@ class Settings { /* {{{ */ $this->_enableEmail = Settings::boolVal($tab["enableEmail"]); $this->_enableUsersView = Settings::boolVal($tab["enableUsersView"]); $this->_enableFolderTree = Settings::boolVal($tab["enableFolderTree"]); + $this->_enableFullSearch = Settings::boolVal($tab["enableFullSearch"]); $this->_expandFolderTree = intval($tab["expandFolderTree"]); // XML Path: /configuration/site/calendar @@ -280,8 +287,11 @@ class Settings { /* {{{ */ $this->_rootDir = strval($tab["rootDir"]); $this->_httpRoot = strval($tab["httpRoot"]); $this->_contentDir = strval($tab["contentDir"]); + $this->_stagingDir = strval($tab["stagingDir"]); + $this->_luceneDir = strval($tab["luceneDir"]); $this->_logFileEnable = Settings::boolVal($tab["logFileEnable"]); $this->_logFileRotation = strval($tab["logFileRotation"]); + $this->_partitionSize = strval($tab["partitionSize"]); // XML Path: /configuration/system/authentication $node = $xml->xpath('/configuration/system/authentication'); @@ -470,6 +480,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "enableEmail", $this->_enableEmail); $this->setXMLAttributValue($node, "enableUsersView", $this->_enableUsersView); $this->setXMLAttributValue($node, "enableFolderTree", $this->_enableFolderTree); + $this->setXMLAttributValue($node, "enableFullSearch", $this->_enableFullSearch); $this->setXMLAttributValue($node, "expandFolderTree", $this->_expandFolderTree); // XML Path: /configuration/site/calendar @@ -484,8 +495,11 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "rootDir", $this->_rootDir); $this->setXMLAttributValue($node, "httpRoot", $this->_httpRoot); $this->setXMLAttributValue($node, "contentDir", $this->_contentDir); + $this->setXMLAttributValue($node, "stagingDir", $this->_stagingDir); + $this->setXMLAttributValue($node, "luceneDir", $this->_luceneDir); $this->setXMLAttributValue($node, "logFileEnable", $this->_logFileEnable); $this->setXMLAttributValue($node, "logFileRotation", $this->_logFileRotation); + $this->setXMLAttributValue($node, "partitionSize", $this->_partitionSize); // XML Path: /configuration/system/authentication $node = $this->getXMLNode($xml, '/configuration/system', 'authentication'); @@ -782,6 +796,24 @@ class Settings { /* {{{ */ } } + // $this->_stagingDir + if (!file_exists($this->_stagingDir)) { + $result["stagingDir"] = array( + "status" => "notfound", + "currentvalue" => $this->_stagingDir, + "suggestionvalue" => $this->_contentDir . 'staging/' + ); + } + + // $this->_luceneDir + if (!file_exists($this->_luceneDir)) { + $result["luceneDir"] = array( + "status" => "notfound", + "currentvalue" => $this->_luceneDir, + "suggestionvalue" => $this->_contentDir . 'lucene/' + ); + } + // $this->_ADOdbPath $bCheckDB = true; if($this->_ADOdbPath) { diff --git a/op/op.Settings.php b/op/op.Settings.php index c9564f578..e6225c54e 100644 --- a/op/op.Settings.php +++ b/op/op.Settings.php @@ -63,6 +63,7 @@ if ($action == "saveSettings") $settings->_enableConverting = getBoolValue("enableConverting"); $settings->_enableEmail =getBoolValue("enableEmail"); $settings->_enableUsersView = getBoolValue("enableUsersView"); + $settings->_enableFullSearch = getBoolValue("enableFullSearch"); $settings->_enableFolderTree = getBoolValue("enableFolderTree"); $settings->_expandFolderTree = intval($_POST["expandFolderTree"]); @@ -75,8 +76,11 @@ if ($action == "saveSettings") $settings->_rootDir = $_POST["rootDir"]; $settings->_httpRoot = $_POST["httpRoot"]; $settings->_contentDir = $_POST["contentDir"]; + $settings->_stagingDir = $_POST["stagingDir"]; + $settings->_luceneDir = $_POST["luceneDir"]; $settings->_logFileEnable = getBoolValue("logFileEnable"); $settings->_logFileRotation = $_POST["logFileRotation"]; + $settings->_partitionSize = $_POST["partitionSize"]; // SETTINGS - SYSTEM - AUTHENTICATION $settings->_enableGuestLogin = getBoolValue("enableGuestLogin"); diff --git a/out/out.Settings.php b/out/out.Settings.php index e5fdada30..b370ff23f 100644 --- a/out/out.Settings.php +++ b/out/out.Settings.php @@ -139,6 +139,10 @@ function ShowHide(strId) : _enableUsersView) echo "checked" ?> /> + "> + : + _enableFullSearch) echo "checked" ?> /> + "> : _enableFolderTree) echo "checked" ?> /> @@ -205,6 +209,14 @@ function ShowHide(strId) : + "> + : + + + "> + : + + "> : _logFileEnable) echo "checked" ?> /> @@ -218,7 +230,10 @@ function ShowHide(strId) - + "> + : + +