diff --git a/alerts.php b/alerts.php index 6d791d213..fc27e130f 100755 --- a/alerts.php +++ b/alerts.php @@ -121,8 +121,6 @@ function IssueAlert($alert) { $obj = DescribeAlert($alert); if (is_array($obj)) { echo 'Issuing Alert-UID #'.$alert['id'].'/'.$alert['state'].': '; - $msg = FormatAlertTpl($obj); - $obj['msg'] = $msg; if (!empty($config['alert']['transports'])) { ExtTransports($obj); } @@ -336,6 +334,9 @@ function ExtTransports($obj) { $opts = array_filter($opts); } if (($opts === true || !empty($opts)) && $opts != false && file_exists($config['install_dir'].'/includes/alerts/transport.'.$transport.'.php')) { + $obj['transport'] = $transport; + $msg = FormatAlertTpl($obj); + $obj['msg'] = $msg; echo $transport.' => '; eval('$tmp = function($obj,$opts) { global $config; '.file_get_contents($config['install_dir'].'/includes/alerts/transport.'.$transport.'.php').' return false; };'); $tmp = $tmp($obj,$opts);