mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 12:41:30 +00:00
add command 'mytasks'
This commit is contained in:
parent
f35573611d
commit
863d203133
|
@ -429,8 +429,7 @@ switch($command) {
|
||||||
if($resArr) {
|
if($resArr) {
|
||||||
$reviews = array();
|
$reviews = array();
|
||||||
$approvals = array();
|
$approvals = array();
|
||||||
foreach ($resArr as $res) {
|
foreach ($resArr as $res) { if($res["status"]==S_DRAFT_REV)
|
||||||
if($res["status"]==S_DRAFT_REV)
|
|
||||||
$reviews[] = $res['id'];
|
$reviews[] = $res['id'];
|
||||||
if($res["status"]==S_DRAFT_APP)
|
if($res["status"]==S_DRAFT_APP)
|
||||||
$approvals[] = $res['id'];
|
$approvals[] = $res['id'];
|
||||||
|
@ -736,6 +735,24 @@ switch($command) {
|
||||||
}
|
}
|
||||||
break; /* }}} */
|
break; /* }}} */
|
||||||
|
|
||||||
|
case 'mytasks': /* {{{ */
|
||||||
|
if($user) {
|
||||||
|
$startts = microtime(true);
|
||||||
|
$reviews = array();
|
||||||
|
$approvals = array();
|
||||||
|
$resArr = $dms->getDocumentList('AppRevByMe', $user);
|
||||||
|
if($resArr) {
|
||||||
|
foreach ($resArr as $res) {
|
||||||
|
if($res["status"]==S_DRAFT_REV)
|
||||||
|
$reviews[] = array('id'=>$res['id'], 'name'=>$res['name']);
|
||||||
|
elseif($res["status"]==S_DRAFT_APP)
|
||||||
|
$approvals[] = array('id'=>$res['id'], 'name'=>$res['name']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
header('Content-Type', 'application/json');
|
||||||
|
echo json_encode(array('error'=>0, 'data'=>array('review'=>$reviews, 'approval'=>$approvals), 'processing_time'=>microtime(true)-$startts));
|
||||||
|
}
|
||||||
|
break; /* }}} */
|
||||||
}
|
}
|
||||||
add_log_line();
|
add_log_line();
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user