mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-07 07:34:58 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
41e2d7b3be
|
@ -24,7 +24,7 @@ include("../inc/inc.Init.php");
|
||||||
include("../inc/inc.Extension.php");
|
include("../inc/inc.Extension.php");
|
||||||
include("../inc/inc.DBInit.php");
|
include("../inc/inc.DBInit.php");
|
||||||
include("../inc/inc.ClassNotificationService.php");
|
include("../inc/inc.ClassNotificationService.php");
|
||||||
include("../inc/inc.ClassEmailNotify.php");
|
//include("../inc/inc.ClassEmailNotify.php");
|
||||||
include("../inc/inc.Notification.php");
|
include("../inc/inc.Notification.php");
|
||||||
include("../inc/inc.ClassController.php");
|
include("../inc/inc.ClassController.php");
|
||||||
|
|
||||||
|
|
|
@ -618,7 +618,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
*/
|
*/
|
||||||
function PUT(&$options) /* {{{ */
|
function PUT(&$options) /* {{{ */
|
||||||
{
|
{
|
||||||
global $settings, $indexconf;
|
global $settings, $fulltextservice;
|
||||||
|
|
||||||
$this->log_options('PUT', $options);
|
$this->log_options('PUT', $options);
|
||||||
|
|
||||||
|
@ -716,22 +716,13 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
if($this->logger)
|
if($this->logger)
|
||||||
$this->logger->log('PUT: adding new version', PEAR_LOG_INFO);
|
$this->logger->log('PUT: adding new version', PEAR_LOG_INFO);
|
||||||
|
|
||||||
if($settings->_enableFullSearch) {
|
|
||||||
$index = $indexconf['Indexer']::open($settings->_luceneDir);
|
|
||||||
$indexconf['Indexer']::init($settings->_stopWordsFile);
|
|
||||||
} else {
|
|
||||||
$index = null;
|
|
||||||
$indexconf = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$controller = Controller::factory('UpdateDocument');
|
$controller = Controller::factory('UpdateDocument');
|
||||||
$controller->setParam('dms', $this->dms);
|
$controller->setParam('dms', $this->dms);
|
||||||
$controller->setParam('user', $this->user);
|
$controller->setParam('user', $this->user);
|
||||||
$controller->setParam('documentsource', 'webdav');
|
$controller->setParam('documentsource', 'webdav');
|
||||||
$controller->setParam('folder', $document->getFolder());
|
$controller->setParam('folder', $document->getFolder());
|
||||||
$controller->setParam('document', $document);
|
$controller->setParam('document', $document);
|
||||||
$controller->setParam('index', $index);
|
$controller->setParam('fulltextservice', $fulltextservice);
|
||||||
$controller->setParam('indexconf', $indexconf);
|
|
||||||
$controller->setParam('comment', '');
|
$controller->setParam('comment', '');
|
||||||
$controller->setParam('userfiletmp', $tmpFile);
|
$controller->setParam('userfiletmp', $tmpFile);
|
||||||
$controller->setParam('userfilename', $name);
|
$controller->setParam('userfilename', $name);
|
||||||
|
@ -799,8 +790,6 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
$controller->setParam('documentsource', 'webdav');
|
$controller->setParam('documentsource', 'webdav');
|
||||||
$controller->setParam('folder', $folder);
|
$controller->setParam('folder', $folder);
|
||||||
$controller->setParam('fulltextservice', $fulltextservice);
|
$controller->setParam('fulltextservice', $fulltextservice);
|
||||||
$controller->setParam('index', $index);
|
|
||||||
$controller->setParam('indexconf', $indexconf);
|
|
||||||
$controller->setParam('name', $name);
|
$controller->setParam('name', $name);
|
||||||
$controller->setParam('comment', '');
|
$controller->setParam('comment', '');
|
||||||
$controller->setParam('expires', 0);
|
$controller->setParam('expires', 0);
|
||||||
|
@ -977,7 +966,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
*/
|
*/
|
||||||
function DELETE($options) /* {{{ */
|
function DELETE($options) /* {{{ */
|
||||||
{
|
{
|
||||||
global $settings, $indexconf;
|
global $settings, $fulltextservice;
|
||||||
|
|
||||||
$this->log_options('DELETE', $options);
|
$this->log_options('DELETE', $options);
|
||||||
|
|
||||||
|
@ -997,14 +986,6 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
return "403 Forbidden";
|
return "403 Forbidden";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($settings->_enableFullSearch) {
|
|
||||||
$index = $indexconf['Indexer']::open($settings->_luceneDir);
|
|
||||||
$indexconf['Indexer']::init($settings->_stopWordsFile);
|
|
||||||
} else {
|
|
||||||
$index = null;
|
|
||||||
$indexconf = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (get_class($obj) == $this->dms->getClassname('folder')) {
|
if (get_class($obj) == $this->dms->getClassname('folder')) {
|
||||||
if($obj->hasDocuments() || $obj->hasSubFolders()) {
|
if($obj->hasDocuments() || $obj->hasSubFolders()) {
|
||||||
if($this->logger)
|
if($this->logger)
|
||||||
|
@ -1025,8 +1006,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
$controller->setParam('dms', $this->dms);
|
$controller->setParam('dms', $this->dms);
|
||||||
$controller->setParam('user', $this->user);
|
$controller->setParam('user', $this->user);
|
||||||
$controller->setParam('folder', $obj);
|
$controller->setParam('folder', $obj);
|
||||||
$controller->setParam('index', $index);
|
$controller->setParam('fulltextservice', $fulltextservice);
|
||||||
$controller->setParam('indexconf', $indexconf);
|
|
||||||
if(!$controller->run()) {
|
if(!$controller->run()) {
|
||||||
return "409 Conflict ".$controller->getErrorMsg();
|
return "409 Conflict ".$controller->getErrorMsg();
|
||||||
}
|
}
|
||||||
|
@ -1065,8 +1045,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
$controller->setParam('dms', $this->dms);
|
$controller->setParam('dms', $this->dms);
|
||||||
$controller->setParam('user', $this->user);
|
$controller->setParam('user', $this->user);
|
||||||
$controller->setParam('document', $obj);
|
$controller->setParam('document', $obj);
|
||||||
$controller->setParam('index', $index);
|
$controller->setParam('fulltextservice', $fulltextservice);
|
||||||
$controller->setParam('indexconf', $indexconf);
|
|
||||||
if(!$controller->run()) {
|
if(!$controller->run()) {
|
||||||
return "409 Conflict ".$controller->getErrorMsg();
|
return "409 Conflict ".$controller->getErrorMsg();
|
||||||
}
|
}
|
||||||
|
@ -1279,7 +1258,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
*/
|
*/
|
||||||
function COPY($options) /* {{{ */
|
function COPY($options) /* {{{ */
|
||||||
{
|
{
|
||||||
global $settings, $indexconf;
|
global $settings, $fulltextservice;
|
||||||
|
|
||||||
$this->log_options('COPY', $options);
|
$this->log_options('COPY', $options);
|
||||||
|
|
||||||
|
@ -1390,21 +1369,12 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
$content = $objsource->getLatestContent();
|
$content = $objsource->getLatestContent();
|
||||||
$fspath = $this->dms->contentDir.'/'.$content->getPath();
|
$fspath = $this->dms->contentDir.'/'.$content->getPath();
|
||||||
|
|
||||||
if($settings->_enableFullSearch) {
|
|
||||||
$index = $indexconf['Indexer']::open($settings->_luceneDir);
|
|
||||||
$indexconf['Indexer']::init($settings->_stopWordsFile);
|
|
||||||
} else {
|
|
||||||
$index = null;
|
|
||||||
$indexconf = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$controller = Controller::factory('AddDocument');
|
$controller = Controller::factory('AddDocument');
|
||||||
$controller->setParam('dms', $this->dms);
|
$controller->setParam('dms', $this->dms);
|
||||||
$controller->setParam('user', $this->user);
|
$controller->setParam('user', $this->user);
|
||||||
$controller->setParam('documentsource', 'webdav');
|
$controller->setParam('documentsource', 'webdav');
|
||||||
$controller->setParam('folder', $objdest);
|
$controller->setParam('folder', $objdest);
|
||||||
$controller->setParam('index', $index);
|
$controller->setParam('fulltextservice', $fulltextservice);
|
||||||
$controller->setParam('indexconf', $indexconf);
|
|
||||||
$controller->setParam('name', $newdocname);
|
$controller->setParam('name', $newdocname);
|
||||||
$controller->setParam('comment', '');
|
$controller->setParam('comment', '');
|
||||||
$controller->setParam('expires', 0);
|
$controller->setParam('expires', 0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user