From 7b93b386a35fd8f72dbe25952912cd8494dc10d7 Mon Sep 17 00:00:00 2001 From: SourceDoctor Date: Sun, 7 Jun 2020 14:46:33 +0200 Subject: [PATCH] Alert Template - sort Alert Rules alphabetic (#11786) --- includes/html/forms/parse-alert-template.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/html/forms/parse-alert-template.inc.php b/includes/html/forms/parse-alert-template.inc.php index 2d6b6ba31b..95bcfba3ab 100644 --- a/includes/html/forms/parse-alert-template.inc.php +++ b/includes/html/forms/parse-alert-template.inc.php @@ -41,7 +41,7 @@ if ($template_edit) { ]; } -foreach (dbFetchRows("SELECT `id`,`rule`,`name` FROM `alert_rules`", []) as $rule) { +foreach (dbFetchRows("SELECT `id`,`rule`,`name` FROM `alert_rules` order by `name`", []) as $rule) { $is_selected = $template_edit ? dbFetchCell("SELECT `alert_templates_id` FROM `alert_template_map` WHERE `alert_rule_id` = ? AND `alert_templates_id` = ?", [$rule['id'], $template_id]) : null; $is_available = dbFetchCell("SELECT `alert_templates_id` FROM `alert_template_map` WHERE `alert_rule_id` = ?", [$rule['id']]); $rules[] = [