diff options
author | Simon Rettberg | 2023-08-03 15:57:36 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-08-03 15:57:36 +0200 |
commit | a86a2ddb781d5368a0b1f4b8a913dd21a7f67588 (patch) | |
tree | 449c5241000e8320928b8cc8f13ac31518a7f14f /modules-available/eventlog/pages | |
parent | [statistics] Add more manufacturer name fixes (diff) | |
download | slx-admin-a86a2ddb781d5368a0b1f4b8a913dd21a7f67588.tar.gz slx-admin-a86a2ddb781d5368a0b1f4b8a913dd21a7f67588.tar.xz slx-admin-a86a2ddb781d5368a0b1f4b8a913dd21a7f67588.zip |
[eventlog] Add example filter rules
Diffstat (limited to 'modules-available/eventlog/pages')
-rw-r--r-- | modules-available/eventlog/pages/rules.inc.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules-available/eventlog/pages/rules.inc.php b/modules-available/eventlog/pages/rules.inc.php index 6d240c73..7b43cfdb 100644 --- a/modules-available/eventlog/pages/rules.inc.php +++ b/modules-available/eventlog/pages/rules.inc.php @@ -48,17 +48,18 @@ class SubPage 'id' => $id, 'type' => $type, 'title' => $title, + 'description' => Request::post('description', '', 'string'), 'data' => json_encode(['list' => array_values($filters)]), 'subject' => Request::post('subject', '', 'string'), 'message' => $message, ]; if ($id === null) { // NEW - Database::exec("INSERT INTO notification_rule (ruleid, type, title, datafilter, subject, message) - VALUES (:id, :type, :title, :data, :subject, :message)", $data); + Database::exec("INSERT INTO notification_rule (ruleid, title, description, type, datafilter, subject, message) + VALUES (:id, :title, :description, :type, :data, :subject, :message)", $data); $id = Database::lastInsertId(); } else { - Database::exec("UPDATE notification_rule SET type = :type, title = :title, datafilter = :data, + Database::exec("UPDATE notification_rule SET type = :type, title = :title, description = :description, datafilter = :data, subject = :subject, message = :message WHERE ruleid = :id", $data); } @@ -116,7 +117,7 @@ class SubPage $filterIdx = 0; $knownIdxList = []; if ($id !== 0) { - $data = Database::queryFirst('SELECT ruleid, title, type, datafilter, subject, message + $data = Database::queryFirst('SELECT ruleid, title, description, type, datafilter, subject, message FROM notification_rule WHERE ruleid = :id', ['id' => $id]); if ($data === false) { Message::addError('invalid-rule-id', $id); |