From cc7ed1d28370fbd4f01b387a31dfa4fd79617636 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 9 Oct 2018 15:10:17 +0800 Subject: [PATCH] EventView.php --- EventView.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/EventView.php b/EventView.php index af1300f..3df1549 100644 --- a/EventView.php +++ b/EventView.php @@ -43,7 +43,7 @@ class Pman_Admin_EventView extends Pman // core_event_audit // the event file.. $d= DB_DataObject::factory('core_event_audit'); - if (is_a($d,'DB_DataObject')) { + if (is_a($d,'DB_DataObject') && $d->count()) { echo "

Changed Data:

"; $d->event_id = $ev->id; foreach($d->fetchAll() as $d) { @@ -70,12 +70,14 @@ class Pman_Admin_EventView extends Pman echo "not available (missing file) $file"; exit; } + echo '
' . htmlspecialchars(print_r(json_decode(file_get_contents($file)), true)) . '
'; if (!empty($ev->remarks)) { echo "

Remarks:

"; + echo '
'. htmlspecialchars($ev->remarks) . '
'; } - echo '
'. htmlspecialchars($ev->remarks) . '
'; + $json = json_decode($ev->remarks, JSON_PRETTY_PRINT); -- 2.39.2