Merge pull request #1089 from marcoAntonioNina/BUG-10156

BUG 10156 Cron execution stop if an error is found in any event SOLVED
This commit is contained in:
julceslauhub
2012-12-12 10:48:37 -08:00
3 changed files with 8 additions and 5 deletions

View File

@@ -2394,9 +2394,11 @@ function PMFGetUserEmailAddress ($id, $APP_UID = null, $prefix = 'usr')
} }
} else { } else {
$oUserRow = UsersPeer::retrieveByPK( $sID ); $oUserRow = UsersPeer::retrieveByPK( $sID );
$sID = $oUserRow->getUsrEmail(); if ($oUserRow != null) {
if (G::emailAddress( $sID )) { $sID = $oUserRow->getUsrEmail();
array_push( $aRecipient, $sID ); if (G::emailAddress( $sID )) {
array_push( $aRecipient, $sID );
}
} }
} }

View File

@@ -578,8 +578,8 @@ class spoolRun
$sFrom = $row["APP_MSG_FROM"]; $sFrom = $row["APP_MSG_FROM"];
$hasEmailFrom = preg_match('/(.+)@(.+)\.(.+)/', $row["APP_MSG_FROM"], $match); $hasEmailFrom = preg_match('/(.+)@(.+)\.(.+)/', $row["APP_MSG_FROM"], $match);
if (! $hasEmailFrom || strpos( $row["APP_MSG_FROM"], $setup['MESS_ACCOUNT'] ) === false) { if (! $hasEmailFrom || strpos( $row["APP_MSG_FROM"], $aConfiguration['MESS_ACCOUNT'] ) === false) {
$sFrom = '"' . stripslashes( $row["APP_MSG_FROM"] ) . '" <' . $setup['MESS_ACCOUNT'] . ">"; $sFrom = '"' . stripslashes( $row["APP_MSG_FROM"] ) . '" <' . $aConfiguration['MESS_ACCOUNT'] . ">";
} }
$this->setData( $row["APP_MSG_UID"], $row["APP_MSG_SUBJECT"], $sFrom, $row["APP_MSG_TO"], $row["APP_MSG_BODY"], date( "Y-m-d H:i:s" ), $row["APP_MSG_CC"], $row["APP_MSG_BCC"], $row["APP_MSG_TEMPLATE"], $row["APP_MSG_ATTACH"] ); $this->setData( $row["APP_MSG_UID"], $row["APP_MSG_SUBJECT"], $sFrom, $row["APP_MSG_TO"], $row["APP_MSG_BODY"], date( "Y-m-d H:i:s" ), $row["APP_MSG_CC"], $row["APP_MSG_BCC"], $row["APP_MSG_TEMPLATE"], $row["APP_MSG_ATTACH"] );

View File

@@ -330,6 +330,7 @@ class AppEvent extends BaseAppEvent
$log[] = ' - The trigger ' . $aRow['TRI_UID'] . ' throw some errors!'; $log[] = ' - The trigger ' . $aRow['TRI_UID'] . ' throw some errors!';
println( " - The trigger {$aRow['TRI_UID']} throw some errors!" ); println( " - The trigger {$aRow['TRI_UID']} throw some errors!" );
print_r( $_SESSION['TRIGGER_DEBUG']['ERRORS'] ); print_r( $_SESSION['TRIGGER_DEBUG']['ERRORS'] );
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = array();
} }
if ($oAppEvent->getAppEvnAttempts() > 0) { if ($oAppEvent->getAppEvnAttempts() > 0) {
$oAppEvent->setAppEvnAttempts( $oAppEvent->getAppEvnAttempts() - 1 ); $oAppEvent->setAppEvnAttempts( $oAppEvent->getAppEvnAttempts() - 1 );