mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°5216 Fix invalid message-id when sending notification using cron on system with a specific locale set (#297)
The timestamp used was indeed locale dependent. This commit fixes this behavior by removing the locale dependency using a better printf format (see https://www.php.net/manual/fr/function.sprintf.php)
This commit is contained in:
@@ -328,8 +328,12 @@ class ActionEmail extends ActionNotification
|
||||
$sBody = MetaModel::ApplyParams($this->Get('body'), $aContextArgs);
|
||||
|
||||
$oObj = $aContextArgs['this->object()'];
|
||||
$sMessageId = sprintf('iTop_%s_%d_%f@%s.openitop.org', get_class($oObj), $oObj->GetKey(), microtime(true /* get as float*/),
|
||||
MetaModel::GetEnvironmentId());
|
||||
$sMessageId = sprintf('iTop_%s_%d_%F@%s.openitop.org',
|
||||
get_class($oObj),
|
||||
$oObj->GetKey(),
|
||||
microtime(true /* get as float*/),
|
||||
MetaModel::GetEnvironmentId()
|
||||
);
|
||||
$sReference = '<'.$sMessageId.'>';
|
||||
}
|
||||
catch (Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user