mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-21 17:11:38 +00:00
- added getWorkflowStatus()
This commit is contained in:
parent
27dfd15814
commit
ce0c35d112
|
@ -932,6 +932,41 @@ class LetoDMS_Core_User {
|
||||||
return $status;
|
return $status;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of documents with a workflow
|
||||||
|
*
|
||||||
|
* @param int $documentID optional document id for which to retrieve the
|
||||||
|
* reviews
|
||||||
|
* @param int $version optional version of the document
|
||||||
|
* @return array list of all workflows
|
||||||
|
*/
|
||||||
|
function getWorkflowStatus($documentID=null, $version=null) { /* {{{ */
|
||||||
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
|
$queryStr = 'select d.*, c.userid from tblWorkflowTransitions a left join tblWorkflows b on a.workflow=b.id left join tblWorkflowTransitionUsers c on a.id=c.transition left join tblWorkflowDocumentContent d on b.id=d.workflow where d.document is not null and a.state=d.state and c.userid='.$this->_id;
|
||||||
|
$resArr = $db->getResultArray($queryStr);
|
||||||
|
if (is_bool($resArr) && $resArr == false)
|
||||||
|
return false;
|
||||||
|
$result['u'] = array();
|
||||||
|
if (count($resArr)>0) {
|
||||||
|
foreach ($resArr as $res) {
|
||||||
|
$result['u'][] = $res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$queryStr = 'select d.*, c.groupid from tblWorkflowTransitions a left join tblWorkflows b on a.workflow=b.id left join tblWorkflowTransitionGroups c on a.id=c.transition left join tblWorkflowDocumentContent d on b.id=d.workflow left join tblGroupMembers e on c.groupid = e.groupID where d.document is not null and a.state=d.state and e.userID='.$this->_id;
|
||||||
|
$resArr = $db->getResultArray($queryStr);
|
||||||
|
if (is_bool($resArr) && $resArr == false)
|
||||||
|
return false;
|
||||||
|
$result['g'] = array();
|
||||||
|
if (count($resArr)>0) {
|
||||||
|
foreach ($resArr as $res) {
|
||||||
|
$result['g'][] = $res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of mandatory reviewers
|
* Get a list of mandatory reviewers
|
||||||
* A user which isn't trusted completely may have assigned mandatory
|
* A user which isn't trusted completely may have assigned mandatory
|
||||||
|
|
Loading…
Reference in New Issue
Block a user