mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
add method getProcessWithoutUserGroup()
checks for reviews/approvals which have lost its user or group
This commit is contained in:
parent
3406739f94
commit
098f15202c
|
@ -2191,6 +2191,34 @@ class SeedDMS_Core_DMS {
|
|||
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Returns a list of reviews, approvals which are not linked
|
||||
* to a user, group anymore
|
||||
*
|
||||
* This method is for finding reviews or approvals whose user
|
||||
* or group was deleted and not just removed from the process.
|
||||
*/
|
||||
function getProcessWithoutUserGroup($process, $usergroup) { /* {{{ */
|
||||
switch($process) {
|
||||
case 'review':
|
||||
$queryStr = "SELECT a.*, b.name FROM tblDocumentReviewers";
|
||||
break;
|
||||
case 'approval':
|
||||
$queryStr = "SELECT a.*, b.name FROM tblDocumentApprovers";
|
||||
break;
|
||||
}
|
||||
$queryStr .= " a LEFT JOIN tblDocuments b ON a.documentID=b.id where";
|
||||
switch($usergroup) {
|
||||
case 'user':
|
||||
$queryStr .= " a.type=0 and a.required not in (select id from tblUsers) ORDER by b.id";
|
||||
break;
|
||||
case 'group':
|
||||
$queryStr .= " a.type=1 and a.required not in (select id from tblGroups) ORDER by b.id";
|
||||
break;
|
||||
}
|
||||
return $this->db->getResultArray($queryStr);
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Returns statitical information
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user