fix line indenting

This commit is contained in:
Uwe Steinmann 2022-02-21 07:12:01 +01:00
parent 022fdc86b3
commit 663dc869f4

View File

@ -657,11 +657,11 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
function setFolder($newFolder) { /* {{{ */ function setFolder($newFolder) { /* {{{ */
$db = $this->_dms->getDB(); $db = $this->_dms->getDB();
if(!$newFolder) if(!$newFolder)
return false; return false;
if(!$newFolder->isType('folder')) if(!$newFolder->isType('folder'))
return false; return false;
$queryStr = "UPDATE `tblDocuments` SET `folder` = " . $newFolder->getID() . " WHERE `id` = ". $this->_id; $queryStr = "UPDATE `tblDocuments` SET `folder` = " . $newFolder->getID() . " WHERE `id` = ". $this->_id;
if (!$db->getResult($queryStr)) if (!$db->getResult($queryStr))
@ -707,11 +707,11 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
function setOwner($newOwner) { /* {{{ */ function setOwner($newOwner) { /* {{{ */
$db = $this->_dms->getDB(); $db = $this->_dms->getDB();
if(!$newOwner) if(!$newOwner)
return false; return false;
if(!$newOwner->isType('user')) if(!$newOwner->isType('user'))
return false; return false;
$queryStr = "UPDATE `tblDocuments` set `owner` = " . $newOwner->getID() . " WHERE `id` = " . $this->_id; $queryStr = "UPDATE `tblDocuments` set `owner` = " . $newOwner->getID() . " WHERE `id` = " . $this->_id;
if (!$db->getResult($queryStr)) if (!$db->getResult($queryStr))
@ -752,8 +752,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
function setDefaultAccess($mode, $noclean="false") { /* {{{ */ function setDefaultAccess($mode, $noclean="false") { /* {{{ */
$db = $this->_dms->getDB(); $db = $this->_dms->getDB();
if($mode < M_LOWEST_RIGHT || $mode > M_HIGHEST_RIGHT) if($mode < M_LOWEST_RIGHT || $mode > M_HIGHEST_RIGHT)
return false; return false;
$queryStr = "UPDATE `tblDocuments` set `defaultAccess` = " . (int) $mode . " WHERE `id` = " . $this->_id; $queryStr = "UPDATE `tblDocuments` set `defaultAccess` = " . (int) $mode . " WHERE `id` = " . $this->_id;
if (!$db->getResult($queryStr)) if (!$db->getResult($queryStr))
@ -2079,8 +2079,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
if (file_exists( $this->_dms->contentDir.$version->getPath() )) if (file_exists( $this->_dms->contentDir.$version->getPath() ))
if (!SeedDMS_Core_File::removeFile( $this->_dms->contentDir.$version->getPath() )) { if (!SeedDMS_Core_File::removeFile( $this->_dms->contentDir.$version->getPath() )) {
$db->rollbackTransaction(); $db->rollbackTransaction();
return false; return false;
} }
$db->commitTransaction(); $db->commitTransaction();
return true; return true;
@ -4187,14 +4187,14 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
$db = $this->_document->getDMS()->getDB(); $db = $this->_document->getDMS()->getDB();
if(!$group->isType('group')) if(!$group->isType('group'))
return -1; return -1;
// Check if the group is on the review list at all. // Check if the group is on the review list at all.
$reviewStatus = $group->getReviewStatus($this->_document->getID(), $this->_version); $reviewStatus = $group->getReviewStatus($this->_document->getID(), $this->_version);
if (is_bool($reviewStatus) && !$reviewStatus) { if (is_bool($reviewStatus) && !$reviewStatus) {
return false; return false;
} }
if (count($reviewStatus)==0) { if (count($reviewStatus)==0) {
// User is not assigned to review this document. No action required. // User is not assigned to review this document. No action required.
// Return an error. // Return an error.
@ -4216,13 +4216,13 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
$requestUser->getID() ."')"; $requestUser->getID() ."')";
$res=$db->getResult($queryStr); $res=$db->getResult($queryStr);
if (is_bool($res) && !$res) if (is_bool($res) && !$res)
return false; return false;
$reviewLogID = $db->getInsertID('tblDocumentReviewLog', 'reviewLogID'); $reviewLogID = $db->getInsertID('tblDocumentReviewLog', 'reviewLogID');
if($file) { if($file) {
SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'r' . $reviewLogID); SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'r' . $reviewLogID);
} }
return $reviewLogID; return $reviewLogID;
} /* }}} */ } /* }}} */
/** /**
@ -5315,9 +5315,9 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
/** /**
* Get the so far logged operations on the document content within the * Get the so far logged operations on the document content within the
* workflow. Even after finishing the workflow (when the document content * workflow. Even after finishing the workflow (when the document content
* does not have workflow set anymore) this function returns the list of all * does not have workflow set anymore) this function returns the list of all
* log entries. * log entries.
* *
* @return array list of objects * @return array list of objects
*/ */
@ -5354,8 +5354,8 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
/** /**
* Get the latest workflow log entry for the document content within the * Get the latest workflow log entry for the document content within the
* workflow. Even after finishing the workflow (when the document content * workflow. Even after finishing the workflow (when the document content
* does not have workflow set anymore) this function returns the last * does not have workflow set anymore) this function returns the last
* log entry. * log entry.
* *
* @return object * @return object
*/ */
@ -5376,7 +5376,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
if (is_bool($resArr) && !$resArr) if (is_bool($resArr) && !$resArr)
return false; return false;
$i = 0; $i = 0;
$workflow = $this->_document->getDMS()->getWorkflow($resArr[$i]["workflow"]); $workflow = $this->_document->getDMS()->getWorkflow($resArr[$i]["workflow"]);
$workflowlog = new SeedDMS_Core_Workflow_Log($resArr[$i]["id"], $this->_document->getDMS()->getDocument($resArr[$i]["document"]), $resArr[$i]["version"], $workflow, $this->_document->getDMS()->getUser($resArr[$i]["userid"]), $workflow->getTransition($resArr[$i]["transition"]), $resArr[$i]["date"], $resArr[$i]["comment"]); $workflowlog = new SeedDMS_Core_Workflow_Log($resArr[$i]["id"], $this->_document->getDMS()->getDocument($resArr[$i]["document"]), $resArr[$i]["version"], $workflow, $this->_document->getDMS()->getUser($resArr[$i]["userid"]), $workflow->getTransition($resArr[$i]["transition"]), $resArr[$i]["date"], $resArr[$i]["comment"]);
$workflowlog->setDMS($this); $workflowlog->setDMS($this);