it's about 6018 bug with +d'date' opcion in the cron
This commit is contained in:
@@ -221,13 +221,14 @@ function resendEmails() {
|
||||
|
||||
function unpauseApplications() {
|
||||
global $sFilter;
|
||||
global $sNow;
|
||||
if($sFilter!='' && strpos($sFilter, 'unpause') === false) return false;
|
||||
setExecutionMessage("Unpausing applications");
|
||||
|
||||
try {
|
||||
G::LoadClass('case');
|
||||
$oCases = new Cases();
|
||||
$oCases->ThrowUnpauseDaemon();
|
||||
$oCases->ThrowUnpauseDaemon($sNow);
|
||||
setExecutionResultMessage('DONE');
|
||||
saveLog('unpauseApplications', 'action', 'Unpausing Applications');
|
||||
}
|
||||
|
||||
@@ -2819,8 +2819,8 @@ class Cases {
|
||||
* @Description: This method set all cases with the APP_DISABLE_ACTION_DATE for today
|
||||
* @return void
|
||||
*/
|
||||
function ThrowUnpauseDaemon() {
|
||||
$today = date('Y-m-d');
|
||||
function ThrowUnpauseDaemon($today) {
|
||||
$today = ($today==date('Y-m-d'))?date('Y-m-d'):$today;
|
||||
$c = new Criteria('workflow');
|
||||
$c->clearSelectColumns();
|
||||
$c->add($c->getNewCriterion(AppDelayPeer::APP_DISABLE_ACTION_USER, null, Criteria::ISNULL)->addOr($c->getNewCriterion(AppDelayPeer::APP_DISABLE_ACTION_USER, 0)));
|
||||
|
||||
@@ -60,7 +60,7 @@ $oCases = new Cases();
|
||||
|
||||
/** here we verify if there is a any case with a unpause on this day*/
|
||||
if( $sTypeList === 'to_do' or $sTypeList === 'draft' or $sTypeList === 'paused') {
|
||||
$oCases->ThrowUnpauseDaemon();
|
||||
$oCases->ThrowUnpauseDaemon(date('Y-m-d'));
|
||||
}
|
||||
|
||||
/* *
|
||||
|
||||
Reference in New Issue
Block a user