mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix template conversion (#8976)
DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
This commit is contained in:
committed by
Neil Lathwood
parent
19c2eadc3f
commit
5bc91addb2
@@ -78,7 +78,7 @@ foreach (explode(PHP_EOL, $vars['template']) as $line) {
|
||||
'@foreach ($alert->contacts as $key => $value)',
|
||||
' @endforeach ',
|
||||
'@php echo \1; @endphp ',
|
||||
'$value[\'string\']',
|
||||
'{{ $value[\'string\'] }}',
|
||||
'{{ $\1[\'\2\'] }}',
|
||||
'{{ $alert->\1 }}',
|
||||
];
|
||||
|
@@ -391,7 +391,7 @@ function populate($txt, $wrap = true)
|
||||
function RunJail($code, $obj)
|
||||
{
|
||||
$ret = '';
|
||||
eval($code);
|
||||
@eval($code);
|
||||
return $ret;
|
||||
}//end RunJail()
|
||||
|
||||
@@ -808,7 +808,7 @@ function ExtTransports($obj)
|
||||
global $config;
|
||||
$tmp = false;
|
||||
$type = new Template;
|
||||
|
||||
|
||||
// If alert transport mapping exists, override the default transports
|
||||
$transport_maps = AlertUtil::getAlertTransports($obj['alert_id']);
|
||||
|
||||
|
Reference in New Issue
Block a user