add new option for configuring replacement of documents in webdav

This commit is contained in:
Uwe Steinmann 2018-04-12 06:41:51 +02:00
parent e98dc5e4f2
commit dfe2e3f167
4 changed files with 28 additions and 0 deletions

View File

@ -71,6 +71,9 @@
calendarDefaultView = "y"
firstDayOfWeek = "0"
/>
<webdav
enableWebdavReplaceDoc="true"
/>
</site>
<system>
<!--

View File

@ -176,6 +176,8 @@ class Settings { /* {{{ */
var $_maxUploadSize = 0;
// enable/disable users images
var $_enableUserImage = false;
// enable/disable replacing documents by webdav
var $_enableWebdavReplaceDoc = true;
// enable/disable calendar
var $_enableCalendar = true;
// calendar default view ("w" for week,"m" for month,"y" for year)
@ -465,6 +467,13 @@ class Settings { /* {{{ */
$this->_expandFolderTree = intval($tab["expandFolderTree"]);
$this->_defaultDocPosition = strval($tab["defaultDocPosition"]);
// XML Path: /configuration/site/calendar
$node = $xml->xpath('/configuration/site/webdav');
if($node) {
$tab = $node[0]->attributes();
$this->_enableWebdavReplaceDoc = Settings::boolVal($tab["enableWebdavReplaceDoc"]);
}
// XML Path: /configuration/site/calendar
$node = $xml->xpath('/configuration/site/calendar');
$tab = $node[0]->attributes();
@ -786,6 +795,10 @@ class Settings { /* {{{ */
$this->setXMLAttributValue($node, "sortFoldersDefault", $this->_sortFoldersDefault);
$this->setXMLAttributValue($node, "defaultDocPosition", $this->_defaultDocPosition);
// XML Path: /configuration/site/calendar
$node = $this->getXMLNode($xml, '/configuration/site', 'webdav');
$this->setXMLAttributValue($node, "enableWebdavReplaceDoc", $this->_enableWebdavReplaceDoc);
// XML Path: /configuration/site/calendar
$node = $this->getXMLNode($xml, '/configuration/site', 'calendar');
$this->setXMLAttributValue($node, "enableCalendar", $this->_enableCalendar);

View File

@ -103,6 +103,9 @@ if ($action == "saveSettings")
$settings->_sortFoldersDefault = $_POST["sortFoldersDefault"];
$settings->_defaultDocPosition = $_POST["defaultDocPosition"];
// SETTINGS - SITE - WEBDAV
$settings->_enableWebdavReplaceDoc = getBoolValue("enableWebdavReplaceDoc");
// SETTINGS - SITE - CALENDAR
$settings->_enableCalendar = getBoolValue("enableCalendar");
$settings->_calendarDefaultView = $_POST["calendarDefaultView"];

View File

@ -361,6 +361,15 @@ if(!is_writeable($settings->_configFilePath)) {
</select>
</tr>
<!--
-- SETTINGS - SITE - WEBDAV
-->
<tr><td></td></tr><tr ><td><b> <?php printMLText("settings_webdav");?></b></td> </tr>
<tr title="<?php printMLText("settings_enableWebdavReplaceDoc_desc");?>">
<td><?php printMLText("settings_enableWebdavReplaceDoc");?>:</td>
<td><input name="enableWebdavReplaceDoc" type="checkbox" <?php if ($settings->_enableWebdavReplaceDoc) echo "checked" ?> /></td>
</tr>
<!--
-- SETTINGS - SITE - CALENDAR
-->