mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-01 22:47:19 +00:00
fix line indenting
This commit is contained in:
parent
0f417a2d7b
commit
535a0b1b67
|
@ -678,11 +678,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))
|
||||||
|
@ -795,8 +795,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))
|
||||||
|
@ -2452,8 +2452,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;
|
||||||
|
@ -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'];
|
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
|
$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 will be set when there are still open reviews */
|
||||||
$pendingReview=false;
|
$pendingReview=false;
|
||||||
|
@ -5055,14 +5055,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.
|
||||||
|
@ -5084,13 +5084,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;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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
|
* The functions behaves like
|
||||||
* {link SeedDMS_Core_DocumentContent::setApprovalByInd} but does it for
|
* {link SeedDMS_Core_DocumentContent::setApprovalByInd} but does it for
|
||||||
* a group instead of a user
|
* a group instead of a user
|
||||||
|
@ -5666,7 +5666,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
$queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`,
|
$queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`,
|
||||||
`comment`, `date`, `userID`) ".
|
`comment`, `date`, `userID`) ".
|
||||||
"VALUES ('". $indstatus["receiptID"] ."', '".
|
"VALUES ('". $indstatus["receiptID"] ."', '".
|
||||||
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentDatetime().", '".
|
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentDatetime().", '".
|
||||||
$requestUser->getID() ."')";
|
$requestUser->getID() ."')";
|
||||||
|
@ -5715,7 +5715,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
$queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`,
|
$queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`,
|
||||||
`comment`, `date`, `userID`) ".
|
`comment`, `date`, `userID`) ".
|
||||||
"VALUES ('". $grpstatus["receiptID"] ."', '".
|
"VALUES ('". $grpstatus["receiptID"] ."', '".
|
||||||
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentDatetime().", '".
|
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentDatetime().", '".
|
||||||
$requestUser->getID() ."')";
|
$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
|
* 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 a workflow set anymore) this function returns the last
|
||||||
* log entry.
|
* log entry.
|
||||||
*
|
*
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
|
@ -6952,7 +6952,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return false;
|
return false;
|
||||||
*/
|
*/
|
||||||
$queryStr=
|
$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";
|
$queryStr .= " ORDER BY `id` DESC LIMIT 1";
|
||||||
$resArr = $db->getResultArray($queryStr);
|
$resArr = $db->getResultArray($queryStr);
|
||||||
if (is_bool($resArr) && !$resArr)
|
if (is_bool($resArr) && !$resArr)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user