mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added user defined titles for alert templates
This commit is contained in:
@ -52,7 +52,7 @@ if(!empty($name)) {
|
||||
elseif( $_REQUEST['template'] && is_numeric($_REQUEST['template_id']) ) {
|
||||
//Update template-text
|
||||
|
||||
if($ret = dbUpdate(array('template' => $_REQUEST['template'], 'name' => $name), "alert_templates", "id = ?", array($_REQUEST['template_id']))) {
|
||||
if($ret = dbUpdate(array('template' => $_REQUEST['template'], 'name' => $name, 'title' => $_REQUEST['title'], 'title_rec' => $_REQUEST['title_rec']), "alert_templates", "id = ?", array($_REQUEST['template_id']))) {
|
||||
$ok = "Updated template";
|
||||
}
|
||||
else {
|
||||
@ -62,7 +62,7 @@ if(!empty($name)) {
|
||||
elseif( $_REQUEST['template'] ) {
|
||||
//Create new template
|
||||
|
||||
if(dbInsert(array('template' => $_REQUEST['template'], 'name' => $name), "alert_templates")) {
|
||||
if(dbInsert(array('template' => $_REQUEST['template'], 'name' => $name, 'title' => $_REQUEST['title'], 'title_rec' => $_REQUEST['title_rec']), "alert_templates")) {
|
||||
$ok = "Alert template has been created.";
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user