diff options
Diffstat (limited to 'modules-available/eventlog/page.inc.php')
-rw-r--r-- | modules-available/eventlog/page.inc.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules-available/eventlog/page.inc.php b/modules-available/eventlog/page.inc.php index 9006c3c5..b24b9447 100644 --- a/modules-available/eventlog/page.inc.php +++ b/modules-available/eventlog/page.inc.php @@ -43,4 +43,21 @@ class Page_EventLog extends Page } } + protected function doAjax() + { + // XXX Should go into rules.inc.php + User::assertPermission('filter.rules.edit'); + if (Request::any('show') === 'rules') { + $type = Request::any('type', Request::REQUIRED, 'string'); + $res = Database::queryFirst('SELECT data FROM notification_sample WHERE type = :type LIMIT 1', + ['type' => $type]); + Header('Content-Type: application/json'); + if ($res === false) { + echo '{}'; + } else { + echo $res['data']; + } + } + } + } |