invoke controller instead of calling run()

This commit is contained in:
Uwe Steinmann 2022-11-06 16:08:57 +01:00
parent 9869c3d8ce
commit 57b298c489

View File

@ -757,7 +757,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('attributes', array());
$controller->setParam('workflow', $workflow);
if(!$content = $controller->run()) {
if(!$content = $controller()) {
if($this->logger)
$this->logger->log('PUT: error adding new version', PEAR_LOG_ERR);
unlink($tmpFile);
@ -853,7 +853,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('notificationusers', array());
$controller->setParam('maxsizeforfulltext', $settings->_maxSizeForFullText);
$controller->setParam('defaultaccessdocs', $settings->_defaultAccessDocs);
if(!$document = $controller->run()) {
if(!$document = $controller()) {
// if(!$res = $folder->addDocument($name, '', 0, $this->user, '', array(), $tmpFile, $name, $fileType, $mimetype, 0, array(), array(), 0, "")) {
unlink($tmpFile);
if($this->logger)
@ -959,7 +959,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('attributes', array());
$controller->setParam('notificationgroups', array());
$controller->setParam('notificationusers', array());
if(!$subFolder = $controller->run()) {
if(!$subFolder = $controller()) {
// if (!$folder->addSubFolder($name, '', $this->user, 0)) {
return "409 Conflict ".$controller->getErrorMsg();
}
@ -1452,8 +1452,7 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
$controller->setParam('notificationusers', array());
$controller->setParam('maxsizeforfulltext', $settings->_maxSizeForFullText);
$controller->setParam('defaultaccessdocs', $settings->_defaultAccessDocs);
if(!$document = $controller->run()) {
// if(!$newdoc = $objdest->addDocument($newdocname, '', 0, $this->user, '', array(), $fspath, $content->getOriginalFileName(), $content->getFileType(), $content->getMimeType(), 0, array(), array(), 0, "")) {
if(!$document = $controller()) {
if($this->logger)
$this->logger->log('COPY: error copying object', PEAR_LOG_ERR);
return "409 Conflict";