mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-10-17 14:30:58 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
a2802f124d
|
@ -1712,6 +1712,52 @@ class SeedDMS_Core_User { /* {{{ */
|
||||||
return $resArr;
|
return $resArr;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of users this user is a mandatory reviewer of
|
||||||
|
*
|
||||||
|
* This method is the reverse function of getMandatoryReviewers(). It returns
|
||||||
|
* those user where the current user is a mandatory reviewer.
|
||||||
|
*
|
||||||
|
* @return array list of users where this user is a mandatory reviewer.
|
||||||
|
*/
|
||||||
|
function isMandatoryReviewerOf() { /* {{{ */
|
||||||
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
|
$queryStr = "SELECT * FROM `tblMandatoryReviewers` WHERE `reviewerUserID` = " . $this->_id;
|
||||||
|
$resArr = $db->getResultArray($queryStr);
|
||||||
|
if (is_bool($resArr) && !$resArr) return false;
|
||||||
|
|
||||||
|
$users = array();
|
||||||
|
foreach($resArr as $res) {
|
||||||
|
$users[] = self::getInstance($res['userID'], $this->_dms);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $users;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a list of users this user is a mandatory approver of
|
||||||
|
*
|
||||||
|
* This method is the reverse function of getMandatoryApprovers(). It returns
|
||||||
|
* those user where the current user is a mandatory approver.
|
||||||
|
*
|
||||||
|
* @return array list of users where this user is a mandatory approver.
|
||||||
|
*/
|
||||||
|
function isMandatoryApproverOf() { /* {{{ */
|
||||||
|
$db = $this->_dms->getDB();
|
||||||
|
|
||||||
|
$queryStr = "SELECT * FROM `tblMandatoryApprovers` WHERE `approverUserID` = " . $this->_id;
|
||||||
|
$resArr = $db->getResultArray($queryStr);
|
||||||
|
if (is_bool($resArr) && !$resArr) return false;
|
||||||
|
|
||||||
|
$users = array();
|
||||||
|
foreach($resArr as $res) {
|
||||||
|
$users[] = self::getInstance($res['userID'], $this->_dms);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $users;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the mandatory workflow
|
* Get the mandatory workflow
|
||||||
* A user which isn't trusted completely may have assigned mandatory
|
* A user which isn't trusted completely may have assigned mandatory
|
||||||
|
|
|
@ -1505,6 +1505,7 @@ if the owner tries to access them
|
||||||
- SeedDMS_Core_Document::getNotifyList() and SeedDMS_Core_Folder::getNotifyList()
|
- SeedDMS_Core_Document::getNotifyList() and SeedDMS_Core_Folder::getNotifyList()
|
||||||
returns just users which are not disabled
|
returns just users which are not disabled
|
||||||
- add new methods removeFromProcesses(), getWorkflowsInvolved(), getKeywordCategories() to SeedDMS_Core_User
|
- add new methods removeFromProcesses(), getWorkflowsInvolved(), getKeywordCategories() to SeedDMS_Core_User
|
||||||
|
- add methods isMandatoryReviewerOf() and isMandatoryApproverOf()
|
||||||
</notes>
|
</notes>
|
||||||
</release>
|
</release>
|
||||||
<release>
|
<release>
|
||||||
|
|
|
@ -134,6 +134,14 @@ $(document).ready( function() {
|
||||||
}
|
}
|
||||||
echo "<tr><td>".getMLText('pending_approvals')."</td><td>".count($tasks['approval'])."</td></tr>\n";
|
echo "<tr><td>".getMLText('pending_approvals')."</td><td>".count($tasks['approval'])."</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
$resArr = $seluser->isMandatoryReviewerOf();
|
||||||
|
if($resArr) {
|
||||||
|
echo "<tr><td>".getMLText('mandatory_reviewers')."</td><td>".count($resArr)."</td></tr>\n";
|
||||||
|
}
|
||||||
|
$resArr = $seluser->isMandatoryApproverOf();
|
||||||
|
if($resArr) {
|
||||||
|
echo "<tr><td>".getMLText('mandatory_approvers')."</td><td>".count($resArr)."</td></tr>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$resArr = $dms->getDocumentList('ReceiptByMe', $seluser);
|
$resArr = $dms->getDocumentList('ReceiptByMe', $seluser);
|
||||||
if($resArr) {
|
if($resArr) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user