Merge remote-tracking branch 'upstream/3.0.1.6' into 3.0.1.6-Gmail

This commit is contained in:
Dante
2015-11-09 14:31:55 -04:00
14 changed files with 208 additions and 261 deletions

View File

@@ -1973,6 +1973,7 @@ class Cases
public function CloseCurrentDelegation($sAppUid, $iDelIndex)
{
try {
$oApplication = ApplicationPeer::retrieveByPk($sAppUid);
$c = new Criteria();
$c->add(AppDelegationPeer::APP_UID, $sAppUid);
$c->add(AppDelegationPeer::DEL_INDEX, $iDelIndex);
@@ -1991,6 +1992,18 @@ class Cases
}
throw (new PropelException('The row cannot be created!', new PropelException($msg)));
}
$taskNext = TaskPeer::retrieveByPK($appDel->getTasUid());
if($taskNext->getTasType() == 'NORMAL'){
if($oApplication->getAppStatus() == "DRAFT"){
$sUserUid = $appDel->getUsrUid();
$users = new Users();
$users->refreshTotal($sUserUid, "remove", "draft");
}else{
$sUserUid = $appDel->getUsrUid();
$users = new Users();
$users->refreshTotal($sUserUid, "remove", "inbox");
}
}
}
/*----------------------------------********---------------------------------*/
$inbox = new ListInbox();