diff options
-rw-r--r-- | modules-available/eventlog/page.inc.php | 1 | ||||
-rw-r--r-- | modules-available/eventlog/templates/page-filters-edit-rule.html | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/modules-available/eventlog/page.inc.php b/modules-available/eventlog/page.inc.php index ef9870e9..56fc97e2 100644 --- a/modules-available/eventlog/page.inc.php +++ b/modules-available/eventlog/page.inc.php @@ -59,6 +59,7 @@ class Page_EventLog extends Page $output += $row; } } + ksort($output); Header('Content-Type: application/json'); echo json_encode($output); } diff --git a/modules-available/eventlog/templates/page-filters-edit-rule.html b/modules-available/eventlog/templates/page-filters-edit-rule.html index a7886397..7016e156 100644 --- a/modules-available/eventlog/templates/page-filters-edit-rule.html +++ b/modules-available/eventlog/templates/page-filters-edit-rule.html @@ -172,8 +172,10 @@ var chFn = function () { var $this = $(this); var wat = currentType[$this.val()]; - if (wat) { - wat = wat.replace("\r", "\\r").replace("\n", "\\n"); + if (typeof(wat) !== 'undefined') { + if (typeof(wat) === 'string') { + wat = wat.replace("\r", "\\r").replace("\n", "\\n"); + } if (wat.length > 180) { wat = wat.substr(0, 180) + '...'; } |