BUG 7752 "No webservice to add notes" SOLVED
- New feature - Web Services for add case note - Added functions "PMFAddCaseNote, WSAddCaseNote" in "class.pmFunctions.php" - Added function "addCaseNote" in "class.wsBase.php" - Added functionality for applications using Web Services * Available from version 2.0.46
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user