Merge remote-tracking branch 'upstream/master' into speedy

This commit is contained in:
user
2012-11-20 14:04:40 -04:00
13 changed files with 571 additions and 297 deletions

View File

@@ -217,10 +217,10 @@ class AppNotes extends BaseAppNotes
$sTo = ((($aUser['USR_FIRSTNAME'] != '') || ($aUser['USR_LASTNAME'] != '')) ? $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' ' : '') . '<' . $aUser['USR_EMAIL'] . '>';
$oSpool = new spoolRun();
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
$aConfiguration['MESS_RAUTH'] = 0;
} else {
$aConfiguration['MESS_RAUTH'] = 1;
if ($aConfiguration['MESS_RAUTH'] == false || (is_string($aConfiguration['MESS_RAUTH']) && $aConfiguration['MESS_RAUTH'] == 'false')) {
$aConfiguration['MESS_RAUTH'] = 0;
} else {
$aConfiguration['MESS_RAUTH'] = 1;
}
$oSpool->setConfig( array ('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],'MESS_SERVER' => $aConfiguration['MESS_SERVER'],'MESS_PORT' => $aConfiguration['MESS_PORT'],'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],'MESS_PASSWORD' => $aConfiguration['MESS_PASSWORD'],'SMTPAuth' => $aConfiguration['MESS_RAUTH'] == '1' ? true : false,'SMTPSecure' => isset( $aConfiguration['SMTPSecure'] ) ? $aConfiguration['SMTPSecure'] : '') );
@@ -235,5 +235,30 @@ class AppNotes extends BaseAppNotes
throw $oException;
}
}
public function addCaseNote($applicationUid, $userUid, $note, $sendMail)
{
$response = $this->postNewNote($applicationUid, $userUid, $note, false);
if ($sendMail == 1) {
G::LoadClass("case");
$case = new Cases();
$p = $case->getUsersParticipatedInCase($applicationUid);
$noteRecipientsList = array();
foreach ($p["array"] as $key => $userParticipated) {
$noteRecipientsList[] = $key;
}
$noteRecipients = implode(",", $noteRecipientsList);
$note = stripslashes($note);
$this->sendNoteNotification($applicationUid, $userUid, $note, $noteRecipients);
}
return $response;
}
}