fix line indenting

This commit is contained in:
Uwe Steinmann 2022-02-21 07:10:28 +01:00
parent 0f417a2d7b
commit 535a0b1b67

View File

@ -678,11 +678,11 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
function setFolder($newFolder) { /* {{{ */
$db = $this->_dms->getDB();
if(!$newFolder)
return false;
if(!$newFolder)
return false;
if(!$newFolder->isType('folder'))
return false;
if(!$newFolder->isType('folder'))
return false;
$queryStr = "UPDATE `tblDocuments` SET `folder` = " . $newFolder->getID() . " WHERE `id` = ". $this->_id;
if (!$db->getResult($queryStr))
@ -795,8 +795,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
function setDefaultAccess($mode, $noclean="false") { /* {{{ */
$db = $this->_dms->getDB();
if($mode < M_LOWEST_RIGHT || $mode > M_HIGHEST_RIGHT)
return false;
if($mode < M_LOWEST_RIGHT || $mode > M_HIGHEST_RIGHT)
return false;
$queryStr = "UPDATE `tblDocuments` set `defaultAccess` = " . (int) $mode . " WHERE `id` = " . $this->_id;
if (!$db->getResult($queryStr))
@ -2452,8 +2452,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
if (file_exists( $this->_dms->contentDir.$version->getPath() ))
if (!SeedDMS_Core_File::removeFile( $this->_dms->contentDir.$version->getPath() )) {
$db->rollbackTransaction();
return false;
}
return false;
}
$db->commitTransaction();
return true;
@ -3405,7 +3405,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
if (!$ignorecurrentstatus && ($st["status"]==S_OBSOLETE || $st["status"]==S_REJECTED || $st["status"]==S_EXPIRED || $st["status"]==S_NEEDS_CORRECTION)) return $st['status'];
$this->_workflow = null; // force to be reloaded from DB
$hasworkflow = $this->getWorkflow() ? true : false;
$hasworkflow = $this->getWorkflow() ? true : false;
/* $pendingReview will be set when there are still open reviews */
$pendingReview=false;
@ -5055,14 +5055,14 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
$db = $this->_document->getDMS()->getDB();
if(!$group->isType('group'))
return -1;
if(!$group->isType('group'))
return -1;
// Check if the group is on the review list at all.
$reviewStatus = $group->getReviewStatus($this->_document->getID(), $this->_version);
if (is_bool($reviewStatus) && !$reviewStatus) {
return false;
}
}
if (count($reviewStatus)==0) {
// User is not assigned to review this document. No action required.
// Return an error.
@ -5084,13 +5084,13 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
$requestUser->getID() ."')";
$res=$db->getResult($queryStr);
if (is_bool($res) && !$res)
return false;
return false;
$reviewLogID = $db->getInsertID('tblDocumentReviewLog', 'reviewLogID');
if($file) {
SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'r' . $reviewLogID);
}
return $reviewLogID;
$reviewLogID = $db->getInsertID('tblDocumentReviewLog', 'reviewLogID');
if($file) {
SeedDMS_Core_File::copyFile($file, $this->_dms->contentDir . $this->_document->getDir() . 'r' . $reviewLogID);
}
return $reviewLogID;
} /* }}} */
/**
@ -5353,8 +5353,8 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
} /* }}} */
/**
* Sets approval status of a document content for a group
*
* Sets approval status of a document content for a group
*
* The functions behaves like
* {link SeedDMS_Core_DocumentContent::setApprovalByInd} but does it for
* a group instead of a user
@ -5666,7 +5666,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
return 0;
$queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`,
`comment`, `date`, `userID`) ".
`comment`, `date`, `userID`) ".
"VALUES ('". $indstatus["receiptID"] ."', '".
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentDatetime().", '".
$requestUser->getID() ."')";
@ -5715,7 +5715,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
return 0;
$queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`,
`comment`, `date`, `userID`) ".
`comment`, `date`, `userID`) ".
"VALUES ('". $grpstatus["receiptID"] ."', '".
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentDatetime().", '".
$requestUser->getID() ."')";
@ -6936,8 +6936,8 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
/**
* Get the latest workflow log entry for the document content within the
* workflow. Even after finishing the workflow (when the document content
* does not have workflow set anymore) this function returns the last
* log entry.
* does not have a workflow set anymore) this function returns the last
* log entry.
*
* @return object
*/
@ -6952,7 +6952,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
return false;
*/
$queryStr=
"SELECT * FROM `tblWorkflowLog` WHERE `workflowdocumentcontent` = ". $this->_workflow['id'];
"SELECT `a`.*, `b`.`workflow`, `b`.`document`, `b`.`version` FROM `tblWorkflowLog` `a` LEFT JOIN `tblWorkflowDocumentContent` `b` ON `a`.`workflowdocumentcontent` = `b`.`id` WHERE `b`.`version`='".$this->_version ."' AND `b`.`document` = '". $this->_document->getID() ."'";
$queryStr .= " ORDER BY `id` DESC LIMIT 1";
$resArr = $db->getResultArray($queryStr);
if (is_bool($resArr) && !$resArr)