mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
0199019ee6
|
@ -2210,13 +2210,17 @@ class SeedDMS_Core_DMS {
|
|||
|
||||
// Send the complete search query to the database.
|
||||
$resArr = $this->db->getResultArray($searchQuery);
|
||||
if($resArr === false)
|
||||
return false;
|
||||
} else {
|
||||
$resArr = array();
|
||||
}
|
||||
} else {
|
||||
// Send the complete search query to the database.
|
||||
$resArr = $this->db->getResultArray($searchQuery);
|
||||
}
|
||||
if($resArr === false)
|
||||
return false;
|
||||
}
|
||||
|
||||
// ------------------- Ausgabe der Ergebnisse ----------------------------
|
||||
$numResults = count($resArr);
|
||||
|
|
|
@ -1582,6 +1582,23 @@ add lots of DocBlocks from merge request #8
|
|||
add SeedDMS_Core_AttributeDefinition::removeValue()
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2018-04-11</date>
|
||||
<time>09:19:24</time>
|
||||
<version>
|
||||
<release>5.1.8</release>
|
||||
<api>5.1.8</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
|
||||
<notes>
|
||||
SeedDMS_Core_DMS::search() returns false in case of an error
|
||||
do not use views in DBAccessPDO by default anymore, use temp. tables
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
<date>2017-02-28</date>
|
||||
<time>06:34:50</time>
|
||||
|
|
|
@ -71,6 +71,9 @@
|
|||
calendarDefaultView = "y"
|
||||
firstDayOfWeek = "0"
|
||||
/>
|
||||
<webdav
|
||||
enableWebdavReplaceDoc="true"
|
||||
/>
|
||||
</site>
|
||||
<system>
|
||||
<!--
|
||||
|
|
|
@ -13,17 +13,45 @@ and its content, while a file system knows just files.
|
|||
In SeedDMS a document is uniquely identified
|
||||
by its document id and not neccessarily by its name. A filesystem
|
||||
requires a unique paths for each file. Two identical files in the
|
||||
same folder are not possible. SeedDMS can handle identifcally named
|
||||
same folder are not possible. SeedDMS can handle identically named
|
||||
documents in one folder. In order to prevent any problems arising from
|
||||
this, you should always disallow identical document names in the
|
||||
settings. By definition a file in WebDAV is mapped on the latest
|
||||
version of a document in SeedDMS. There is no way to access previous
|
||||
versions of a document via WebDAV. Whenever you modify a file,
|
||||
versions of a document via WebDAV. Whenever you modify a file and
|
||||
upload it with the web gui,
|
||||
a new version will be created. Unfortunately, this has some very
|
||||
nasty side effects when you often save a file, because any save
|
||||
operation will create a new version. This is because the WebDAV
|
||||
server replaces the content of document instead of creating a new
|
||||
version if a document is saved again.
|
||||
nasty side effects when you edit a document version via WebDAV and
|
||||
often save it, because any save
|
||||
operation will create a new version. This is why the WebDAV
|
||||
server has a configuration option which allows to either replace
|
||||
the content of document or creating a new
|
||||
version if a document is saved.
|
||||
|
||||
Configuring davfs2
|
||||
===================
|
||||
|
||||
On Linux it is quite simple to mount the SeedDMS WebDAV server with
|
||||
davfs2. Just place a line like the following in your /etc/fstab
|
||||
|
||||
http://seeddms.your-domain.com/webdav/index.php /media/webdav davfs noauto,user,rw,uid=1000,gid=1000
|
||||
|
||||
and mount it as root with
|
||||
|
||||
mount /media/webdav davfs
|
||||
|
||||
You may as well want to configure davfs2 in /etc/davfs2/davfs2.conf by setting
|
||||
|
||||
[/media/webdav]
|
||||
use_locks 0
|
||||
gui_optimize 1
|
||||
|
||||
and possibly add your login data to /etc/davfs2/secrets
|
||||
|
||||
/media/webdav admin secret
|
||||
|
||||
Making applications work with WebDAV
|
||||
=====================================
|
||||
|
||||
Various programms have differnt strategies to save files to disk and
|
||||
prevent data lost under all circumstances. Those strategies often don't
|
||||
|
@ -35,19 +63,31 @@ VIM
|
|||
|
||||
vim does a lot more than just reading and writing the file you want
|
||||
to edit. It creates swap and backup files for data recovery if vim crashes
|
||||
or is being kill unexpectivly. On a low bandwidth connection this can
|
||||
or is being killed unexpectively. On a low bandwidth connection this can
|
||||
slow down the editing. For that reason you should either not create the
|
||||
swap file at all or create it outside the WebDAV server. A second problem
|
||||
arises from how vim modifіes the file you are editing. Before a file
|
||||
is saved a backup is created and the new content is written into a new
|
||||
file with the name of the original file. On a file system you
|
||||
won't see a difference between the file before and after saveing, though
|
||||
is actually a new one. In SeedDMS you won't notice a difference either
|
||||
if just looking at the document name. It's still the same, but the
|
||||
is saved a backup is created by renaming the file to the same name with a
|
||||
'~' at the end and writing the file content into a new
|
||||
file with the name of the original file. Afterwards vim deleteѕ the backup
|
||||
file. On a regular file system you
|
||||
won't see a difference between the file before and after saving, though
|
||||
it is actually a new one. In SeedDMS you won't notice a difference either
|
||||
by just looking at the document name. It's still the same, but the
|
||||
document id has changed. So saving a document will delete the
|
||||
old document and create a new one instead of creating a new version of
|
||||
the old document. If you don't want this behaviour, then tell vim
|
||||
to not create the backup. Creating the backup file in a directory
|
||||
outside of WebDAV doesn't help in this case.
|
||||
to not create the backup file. You can do that by either passing additional
|
||||
parameters to vim
|
||||
|
||||
vi "+set nobackup" "+set nobackuwrite" -n test.txt
|
||||
vi "+set nobackup" "+set nowritebackup" -n test.txt
|
||||
|
||||
or by setting them in your .vimrc
|
||||
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
set noswapfile
|
||||
|
||||
Creating the backup file in a directory outside of WebDAV doesn't help in
|
||||
this case, because it still does the file renaming which is turned of by
|
||||
'nowritebackup'.
|
||||
|
|
|
@ -204,6 +204,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)
|
||||
|
@ -509,56 +511,67 @@ class Settings { /* {{{ */
|
|||
$this->_libraryFolder = intval($tab["libraryFolder"]);
|
||||
$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();
|
||||
$this->_enableCalendar = Settings::boolVal($tab["enableCalendar"]);
|
||||
$this->_calendarDefaultView = strval($tab["calendarDefaultView"]);
|
||||
$this->_firstDayOfWeek = intval($tab["firstDayOfWeek"]);
|
||||
if($node) {
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_enableCalendar = Settings::boolVal($tab["enableCalendar"]);
|
||||
$this->_calendarDefaultView = strval($tab["calendarDefaultView"]);
|
||||
$this->_firstDayOfWeek = intval($tab["firstDayOfWeek"]);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/system/server
|
||||
$node = $xml->xpath('/configuration/system/server');
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_rootDir = strval($tab["rootDir"]);
|
||||
$this->_httpRoot = strval($tab["httpRoot"]);
|
||||
$this->_contentDir = strval($tab["contentDir"]);
|
||||
if($this->_contentDir && substr($this->_contentDir, -1, 1) != DIRECTORY_SEPARATOR)
|
||||
$this->_contentDir .= DIRECTORY_SEPARATOR;
|
||||
$this->_cacheDir = strval($tab["cacheDir"]);
|
||||
$this->_stagingDir = strval($tab["stagingDir"]);
|
||||
$this->_luceneDir = strval($tab["luceneDir"]);
|
||||
$this->_dropFolderDir = strval($tab["dropFolderDir"]);
|
||||
$this->_backupDir = strval($tab["backupDir"]);
|
||||
$this->_checkOutDir = strval($tab["checkOutDir"]);
|
||||
$this->_createCheckOutDir = Settings::boolVal($tab["createCheckOutDir"]);
|
||||
$this->_repositoryUrl = strval($tab["repositoryUrl"]);
|
||||
$this->_logFileEnable = Settings::boolVal($tab["logFileEnable"]);
|
||||
$this->_logFileRotation = strval($tab["logFileRotation"]);
|
||||
$this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]);
|
||||
$this->_partitionSize = strval($tab["partitionSize"]);
|
||||
$this->_maxUploadSize = strval($tab["maxUploadSize"]);
|
||||
if($node) {
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_rootDir = strval($tab["rootDir"]);
|
||||
$this->_httpRoot = strval($tab["httpRoot"]);
|
||||
$this->_contentDir = strval($tab["contentDir"]);
|
||||
if($this->_contentDir && substr($this->_contentDir, -1, 1) != DIRECTORY_SEPARATOR)
|
||||
$this->_contentDir .= DIRECTORY_SEPARATOR;
|
||||
$this->_cacheDir = strval($tab["cacheDir"]);
|
||||
$this->_stagingDir = strval($tab["stagingDir"]);
|
||||
$this->_luceneDir = strval($tab["luceneDir"]);
|
||||
$this->_dropFolderDir = strval($tab["dropFolderDir"]);
|
||||
$this->_backupDir = strval($tab["backupDir"]);
|
||||
$this->_checkOutDir = strval($tab["checkOutDir"]);
|
||||
$this->_createCheckOutDir = Settings::boolVal($tab["createCheckOutDir"]);
|
||||
$this->_repositoryUrl = strval($tab["repositoryUrl"]);
|
||||
$this->_logFileEnable = Settings::boolVal($tab["logFileEnable"]);
|
||||
$this->_logFileRotation = strval($tab["logFileRotation"]);
|
||||
$this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]);
|
||||
$this->_partitionSize = strval($tab["partitionSize"]);
|
||||
$this->_maxUploadSize = strval($tab["maxUploadSize"]);
|
||||
|
||||
// XML Path: /configuration/system/authentication
|
||||
$node = $xml->xpath('/configuration/system/authentication');
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_enableGuestLogin = Settings::boolVal($tab["enableGuestLogin"]);
|
||||
$this->_enableGuestAutoLogin = Settings::boolVal($tab["enableGuestAutoLogin"]);
|
||||
$this->_enable2FactorAuthentication = Settings::boolVal($tab["enable2FactorAuthentication"]);
|
||||
$this->_enablePasswordForgotten = Settings::boolVal($tab["enablePasswordForgotten"]);
|
||||
$this->_passwordStrength = intval($tab["passwordStrength"]);
|
||||
$this->_passwordStrengthAlgorithm = strval($tab["passwordStrengthAlgorithm"]);
|
||||
$this->_passwordExpiration = intval($tab["passwordExpiration"]);
|
||||
$this->_passwordHistory = intval($tab["passwordHistory"]);
|
||||
$this->_loginFailure = intval($tab["loginFailure"]);
|
||||
$this->_autoLoginUser = intval($tab["autoLoginUser"]);
|
||||
$this->_quota = intval($tab["quota"]);
|
||||
$this->_undelUserIds = strval($tab["undelUserIds"]);
|
||||
$this->_encryptionKey = strval($tab["encryptionKey"]);
|
||||
$this->_cookieLifetime = intval($tab["cookieLifetime"]);
|
||||
$this->_defaultAccessDocs = intval($tab["defaultAccessDocs"]);
|
||||
$this->_restricted = Settings::boolVal($tab["restricted"]);
|
||||
$this->_enableUserImage = Settings::boolVal($tab["enableUserImage"]);
|
||||
$this->_disableSelfEdit = Settings::boolVal($tab["disableSelfEdit"]);
|
||||
// XML Path: /configuration/system/authentication
|
||||
$node = $xml->xpath('/configuration/system/authentication');
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_enableGuestLogin = Settings::boolVal($tab["enableGuestLogin"]);
|
||||
$this->_enableGuestAutoLogin = Settings::boolVal($tab["enableGuestAutoLogin"]);
|
||||
$this->_enable2FactorAuthentication = Settings::boolVal($tab["enable2FactorAuthentication"]);
|
||||
$this->_enablePasswordForgotten = Settings::boolVal($tab["enablePasswordForgotten"]);
|
||||
$this->_passwordStrength = intval($tab["passwordStrength"]);
|
||||
$this->_passwordStrengthAlgorithm = strval($tab["passwordStrengthAlgorithm"]);
|
||||
$this->_passwordExpiration = intval($tab["passwordExpiration"]);
|
||||
$this->_passwordHistory = intval($tab["passwordHistory"]);
|
||||
$this->_loginFailure = intval($tab["loginFailure"]);
|
||||
$this->_autoLoginUser = intval($tab["autoLoginUser"]);
|
||||
$this->_quota = intval($tab["quota"]);
|
||||
$this->_undelUserIds = strval($tab["undelUserIds"]);
|
||||
$this->_encryptionKey = strval($tab["encryptionKey"]);
|
||||
$this->_cookieLifetime = intval($tab["cookieLifetime"]);
|
||||
$this->_defaultAccessDocs = intval($tab["defaultAccessDocs"]);
|
||||
$this->_restricted = Settings::boolVal($tab["restricted"]);
|
||||
$this->_enableUserImage = Settings::boolVal($tab["enableUserImage"]);
|
||||
$this->_disableSelfEdit = Settings::boolVal($tab["disableSelfEdit"]);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/system/authentication/connectors/connector
|
||||
// attributs mandatories : type enable
|
||||
|
@ -604,13 +617,15 @@ class Settings { /* {{{ */
|
|||
|
||||
// XML Path: /configuration/system/database
|
||||
$node = $xml->xpath('/configuration/system/database');
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_dbDriver = strval($tab["dbDriver"]);
|
||||
$this->_dbHostname = strval($tab["dbHostname"]);
|
||||
$this->_dbDatabase = strval($tab["dbDatabase"]);
|
||||
$this->_dbUser = strval($tab["dbUser"]);
|
||||
$this->_dbPass = strval($tab["dbPass"]);
|
||||
$this->_doNotCheckDBVersion = Settings::boolVal($tab["doNotCheckDBVersion"]);
|
||||
if($node) {
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_dbDriver = strval($tab["dbDriver"]);
|
||||
$this->_dbHostname = strval($tab["dbHostname"]);
|
||||
$this->_dbDatabase = strval($tab["dbDatabase"]);
|
||||
$this->_dbUser = strval($tab["dbUser"]);
|
||||
$this->_dbPass = strval($tab["dbPass"]);
|
||||
$this->_doNotCheckDBVersion = Settings::boolVal($tab["doNotCheckDBVersion"]);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/system/smtp
|
||||
$node = $xml->xpath('/configuration/system/smtp');
|
||||
|
@ -639,44 +654,50 @@ class Settings { /* {{{ */
|
|||
|
||||
// XML Path: /configuration/advanced/display
|
||||
$node = $xml->xpath('/configuration/advanced/display');
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_siteDefaultPage = strval($tab["siteDefaultPage"]);
|
||||
$this->_rootFolderID = intval($tab["rootFolderID"]);
|
||||
$this->_titleDisplayHack = Settings::boolval($tab["titleDisplayHack"]);
|
||||
$this->_showMissingTranslations = Settings::boolval($tab["showMissingTranslations"]);
|
||||
if($node) {
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_siteDefaultPage = strval($tab["siteDefaultPage"]);
|
||||
$this->_rootFolderID = intval($tab["rootFolderID"]);
|
||||
$this->_titleDisplayHack = Settings::boolval($tab["titleDisplayHack"]);
|
||||
$this->_showMissingTranslations = Settings::boolval($tab["showMissingTranslations"]);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/advanced/authentication
|
||||
$node = $xml->xpath('/configuration/advanced/authentication');
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_guestID = intval($tab["guestID"]);
|
||||
$this->_adminIP = strval($tab["adminIP"]);
|
||||
if($node) {
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_guestID = intval($tab["guestID"]);
|
||||
$this->_adminIP = strval($tab["adminIP"]);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/advanced/edition
|
||||
$node = $xml->xpath('/configuration/advanced/edition');
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_enableAdminRevApp = Settings::boolval($tab["enableAdminRevApp"]);
|
||||
$this->_enableOwnerRevApp = Settings::boolval($tab["enableOwnerRevApp"]);
|
||||
$this->_enableSelfRevApp = Settings::boolval($tab["enableSelfRevApp"]);
|
||||
$this->_enableUpdateRevApp = Settings::boolval($tab["enableUpdateRevApp"]);
|
||||
$this->_enableSelfReceipt = Settings::boolval($tab["enableSelfReceipt"]);
|
||||
$this->_enableAdminReceipt = Settings::boolval($tab["enableAdminReceipt"]);
|
||||
$this->_enableOwnerReceipt = Settings::boolval($tab["enableOwnerReceipt"]);
|
||||
$this->_enableUpdateReceipt = Settings::boolval($tab["enableUpdateReceipt"]);
|
||||
$this->_enableFilterReceipt = Settings::boolval($tab["enableFilterReceipt"]);
|
||||
$this->_presetExpirationDate = strval($tab["presetExpirationDate"]);
|
||||
$this->_initialDocumentStatus = intval($tab["initialDocumentStatus"]);
|
||||
$this->_versioningFileName = strval($tab["versioningFileName"]);
|
||||
$this->_workflowMode = strval($tab["workflowMode"]);
|
||||
$this->_enableReceiptWorkflow = strval($tab["enableReceiptWorkflow"]);
|
||||
$this->_enableRevisionWorkflow = strval($tab["enableRevisionWorkflow"]);
|
||||
$this->_enableRevisionOnVoteReject = strval($tab["enableRevisionOnVoteReject"]);
|
||||
$this->_allowReviewerOnly = Settings::boolval($tab["allowReviewerOnly"]);
|
||||
$this->_enableVersionDeletion = Settings::boolval($tab["enableVersionDeletion"]);
|
||||
$this->_enableVersionModification = Settings::boolval($tab["enableVersionModification"]);
|
||||
$this->_enableDuplicateDocNames = Settings::boolval($tab["enableDuplicateDocNames"]);
|
||||
$this->_overrideMimeType = Settings::boolval($tab["overrideMimeType"]);
|
||||
$this->_advancedAcl = Settings::boolval($tab["advancedAcl"]);
|
||||
$this->_removeFromDropFolder = Settings::boolval($tab["removeFromDropFolder"]);
|
||||
if($node) {
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_enableAdminRevApp = Settings::boolval($tab["enableAdminRevApp"]);
|
||||
$this->_enableOwnerRevApp = Settings::boolval($tab["enableOwnerRevApp"]);
|
||||
$this->_enableSelfRevApp = Settings::boolval($tab["enableSelfRevApp"]);
|
||||
$this->_enableUpdateRevApp = Settings::boolval($tab["enableUpdateRevApp"]);
|
||||
$this->_enableSelfReceipt = Settings::boolval($tab["enableSelfReceipt"]);
|
||||
$this->_enableAdminReceipt = Settings::boolval($tab["enableAdminReceipt"]);
|
||||
$this->_enableOwnerReceipt = Settings::boolval($tab["enableOwnerReceipt"]);
|
||||
$this->_enableUpdateReceipt = Settings::boolval($tab["enableUpdateReceipt"]);
|
||||
$this->_enableFilterReceipt = Settings::boolval($tab["enableFilterReceipt"]);
|
||||
$this->_presetExpirationDate = strval($tab["presetExpirationDate"]);
|
||||
$this->_initialDocumentStatus = intval($tab["initialDocumentStatus"]);
|
||||
$this->_versioningFileName = strval($tab["versioningFileName"]);
|
||||
$this->_workflowMode = strval($tab["workflowMode"]);
|
||||
$this->_enableReceiptWorkflow = strval($tab["enableReceiptWorkflow"]);
|
||||
$this->_enableRevisionWorkflow = strval($tab["enableRevisionWorkflow"]);
|
||||
$this->_enableRevisionOnVoteReject = strval($tab["enableRevisionOnVoteReject"]);
|
||||
$this->_allowReviewerOnly = Settings::boolval($tab["allowReviewerOnly"]);
|
||||
$this->_enableVersionDeletion = Settings::boolval($tab["enableVersionDeletion"]);
|
||||
$this->_enableVersionModification = Settings::boolval($tab["enableVersionModification"]);
|
||||
$this->_enableDuplicateDocNames = Settings::boolval($tab["enableDuplicateDocNames"]);
|
||||
$this->_overrideMimeType = Settings::boolval($tab["overrideMimeType"]);
|
||||
$this->_advancedAcl = Settings::boolval($tab["advancedAcl"]);
|
||||
$this->_removeFromDropFolder = Settings::boolval($tab["removeFromDropFolder"]);
|
||||
}
|
||||
|
||||
// XML Path: /configuration/advanced/notification
|
||||
$node = $xml->xpath('/configuration/advanced/notification');
|
||||
|
@ -689,18 +710,20 @@ class Settings { /* {{{ */
|
|||
|
||||
// XML Path: /configuration/advanced/server
|
||||
$node = $xml->xpath('/configuration/advanced/server');
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_coreDir = strval($tab["coreDir"]);
|
||||
$this->_luceneClassDir = strval($tab["luceneClassDir"]);
|
||||
$this->_extraPath = strval($tab["extraPath"]);
|
||||
$this->_contentOffsetDir = strval($tab["contentOffsetDir"]);
|
||||
$this->_maxDirID = intval($tab["maxDirID"]);
|
||||
$this->_updateNotifyTime = intval($tab["updateNotifyTime"]);
|
||||
$this->_cmdTimeout = intval($tab["cmdTimeout"]);
|
||||
if (isset($tab["maxExecutionTime"]))
|
||||
$this->_maxExecutionTime = intval($tab["maxExecutionTime"]);
|
||||
else
|
||||
$this->_maxExecutionTime = ini_get("max_execution_time");
|
||||
if($node) {
|
||||
$tab = $node[0]->attributes();
|
||||
$this->_coreDir = strval($tab["coreDir"]);
|
||||
$this->_luceneClassDir = strval($tab["luceneClassDir"]);
|
||||
$this->_extraPath = strval($tab["extraPath"]);
|
||||
$this->_contentOffsetDir = strval($tab["contentOffsetDir"]);
|
||||
$this->_maxDirID = intval($tab["maxDirID"]);
|
||||
$this->_updateNotifyTime = intval($tab["updateNotifyTime"]);
|
||||
$this->_cmdTimeout = intval($tab["cmdTimeout"]);
|
||||
if (isset($tab["maxExecutionTime"]))
|
||||
$this->_maxExecutionTime = intval($tab["maxExecutionTime"]);
|
||||
else
|
||||
$this->_maxExecutionTime = ini_get("max_execution_time");
|
||||
}
|
||||
|
||||
// XML Path: /configuration/system/advanced/converters
|
||||
$convertergroups = $xml->xpath('/configuration/advanced/converters');
|
||||
|
@ -847,6 +870,10 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "libraryFolder", $this->_libraryFolder);
|
||||
$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);
|
||||
|
|
|
@ -105,6 +105,9 @@ if ($action == "saveSettings")
|
|||
$settings->_defaultDocPosition = $_POST["defaultDocPosition"];
|
||||
$settings->_libraryFolder = intval($_POST["libraryFolder"]);
|
||||
|
||||
// SETTINGS - SITE - WEBDAV
|
||||
$settings->_enableWebdavReplaceDoc = getBoolValue("enableWebdavReplaceDoc");
|
||||
|
||||
// SETTINGS - SITE - CALENDAR
|
||||
$settings->_enableCalendar = getBoolValue("enableCalendar");
|
||||
$settings->_calendarDefaultView = $_POST["calendarDefaultView"];
|
||||
|
|
|
@ -427,7 +427,7 @@ function createFolder($id) { /* {{{ */
|
|||
if($folder = $parent->addSubFolder($name, $comment, $userobj, 0, $newattrs)) {
|
||||
|
||||
$rec = __getFolderData($folder);
|
||||
$app->response()->status(201);
|
||||
$app->response()->status(201);
|
||||
$app->response()->header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>true, 'message'=>'', 'data'=>$rec));
|
||||
} else {
|
||||
|
@ -747,10 +747,10 @@ function uploadDocumentFile($documentId) { /* {{{ */
|
|||
$app->response()->header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'No access', 'data'=>''));
|
||||
}
|
||||
} else {
|
||||
if($document === null)
|
||||
} else {
|
||||
if($document === null)
|
||||
$app->response()->status(400);
|
||||
else
|
||||
else
|
||||
$app->response()->status(500);
|
||||
$app->response()->header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'No such document', 'data'=>''));
|
||||
|
@ -1226,6 +1226,10 @@ function doSearch() { /* {{{ */
|
|||
if(!$limit = $app->request()->get('limit'))
|
||||
$limit = 5;
|
||||
$resArr = $dms->search($querystr);
|
||||
if($resArr === false) {
|
||||
$app->response()->header('Content-Type', 'application/json');
|
||||
echo json_encode(array());
|
||||
}
|
||||
$entries = array();
|
||||
$count = 0;
|
||||
if($resArr['folders']) {
|
||||
|
@ -1377,7 +1381,7 @@ function getUsers() { /* {{{ */
|
|||
$users = $dms->getAllUsers();
|
||||
$data = [];
|
||||
foreach($users as $u)
|
||||
$data[] = __getUserData($u);
|
||||
$data[] = __getUserData($u);
|
||||
|
||||
$app->response()->header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>true, 'message'=>'', 'data'=>$data));
|
||||
|
@ -1803,12 +1807,12 @@ function changeFolderAccess($id, $operationType, $userOrGroup) { /* {{{ */
|
|||
function getCategories() { /* {{{ */
|
||||
global $app, $dms, $userobj;
|
||||
|
||||
if(false === ($categories = $dms->getDocumentCategories())) {
|
||||
if(false === ($categories = $dms->getDocumentCategories())) {
|
||||
$app->response()->status(500);
|
||||
$app->response()->header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'Could not get categories', 'data'=>null));
|
||||
$app->response()->header('Content-Type', 'application/json');
|
||||
echo json_encode(array('success'=>false, 'message'=>'Could not get categories', 'data'=>null));
|
||||
return;
|
||||
}
|
||||
}
|
||||
$data = [];
|
||||
foreach($categories as $category)
|
||||
$data[] = ['id' => (int)$category->getId(), 'name' => $category->getName()];
|
||||
|
|
|
@ -381,6 +381,15 @@ if(!is_writeable($settings->_configFilePath)) {
|
|||
<td><?php $this->printFolderChooserHtml("form1", M_READWRITE, -1, $dms->getFolder($settings->_libraryFolder), 'libraryFolder');?></td>
|
||||
</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
|
||||
-->
|
||||
|
|
|
@ -91,7 +91,14 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
|||
*/
|
||||
function log_options($methode, $options) { /* {{{ */
|
||||
if($this->logger) {
|
||||
$this->logger->log($methode.': '.$options['path'], PEAR_LOG_INFO);
|
||||
switch($methode) {
|
||||
case 'MOVE':
|
||||
$msg = $methode.': '.$options['path'].' -> '.$options['dest'];
|
||||
break;
|
||||
default:
|
||||
$msg = $methode.': '.$options['path'];
|
||||
}
|
||||
$this->logger->log($msg, PEAR_LOG_INFO);
|
||||
foreach($options as $key=>$option) {
|
||||
if(is_array($option)) {
|
||||
$this->logger->log($methode.': '.$key.'='.var_export($option, true), PEAR_LOG_DEBUG);
|
||||
|
@ -613,7 +620,8 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
|||
if($this->user->getID() == $lc->getUser()->getID() &&
|
||||
$name == $lc->getOriginalFileName() &&
|
||||
$fileType == $lc->getFileType() &&
|
||||
$mimetype == $lc->getMimeType()) {
|
||||
$mimetype == $lc->getMimeType() &&
|
||||
$settings->_enableWebdavReplaceDoc) {
|
||||
if($this->logger)
|
||||
$this->logger->log('PUT: replacing latest version', PEAR_LOG_INFO);
|
||||
if(!$document->replaceContent($lc->getVersion(), $this->user, $tmpFile, $name, $fileType, $mimetype)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user