- Fixed bug with change tracking of TEXT attributes

- Log any email notification (successful or not)
- Class selection always made through a Combo box
- Automatic creation of indexes for external keys
- New trigger: on object creation
- Application log: added a status string
- Added documentation to the WSDL (+ anyType replaced by string)
- SOAP: improved handling of enumeration attributes
- SOAP: returned logs to mention the name of the parameter as advertised in the WSDL file (different than the name of the attribute in Itop)
- Finalized SOAP tests
- Added a SOAP client example

SVN:trunk[246]
This commit is contained in:
Romain Quetiez
2010-01-13 13:30:08 +00:00
parent 89fa70d755
commit 8964b13a2e
16 changed files with 554 additions and 117 deletions

View File

@@ -215,25 +215,28 @@ class ActionEmail extends ActionNotification
$sHeaders .= "Bcc: $sBCC\r\n";
}
// Mail it
$oLog = new EventNotificationEmail();
if (mail($sTo, $sSubject, $sBody, $sHeaders))
{
$oLog = new EventNotificationEmail();
$oLog->Set('userinfo', UserRights::GetUser());
$oLog->Set('trigger_id', $oTrigger->GetKey());
$oLog->Set('action_id', $this->GetKey());
$oLog->Set('object_id', $aContextArgs['this->id']);
$oLog->Set('to', $sTo);
$oLog->Set('cc', $sCC);
$oLog->Set('bcc', $sBCC);
$oLog->Set('subject', $sSubject);
$oLog->Set('body', $sBody);
$oLog->DBInsertNoReload();
$oLog->Set('message', 'Notification sent');
}
else
{
throw new CoreException('mail not sent', array('action'=>$this->GetKey(), 'to'=>$sTo, 'subject'=>$sSubject, 'headers'=>$sHeaders));
$aLastError = error_get_last();
$oLog->Set('message', 'Mail could not be sent: '.$aLastError['message']);
//throw new CoreException('mail not sent', array('action'=>$this->GetKey(), 'to'=>$sTo, 'subject'=>$sSubject, 'headers'=>$sHeaders));
}
$oLog->Set('userinfo', UserRights::GetUser());
$oLog->Set('trigger_id', $oTrigger->GetKey());
$oLog->Set('action_id', $this->GetKey());
$oLog->Set('object_id', $aContextArgs['this->id']);
$oLog->Set('to', $sTo);
$oLog->Set('cc', $sCC);
$oLog->Set('bcc', $sBCC);
$oLog->Set('subject', $sSubject);
$oLog->Set('body', $sBody);
$oLog->DBInsertNoReload();
}
}
?>