From 7bb18276281636564a8a7f7fa64b4dceab4602a8 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Wed, 16 Nov 2011 21:05:55 +0000 Subject: [PATCH] only show syslog on device overview when enable_syslog=1 git-svn-id: http://www.observium.org/svn/observer/trunk@2727 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/device/overview.inc.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/html/pages/device/overview.inc.php b/html/pages/device/overview.inc.php index 7562ca9551..79aca96136 100644 --- a/html/pages/device/overview.inc.php +++ b/html/pages/device/overview.inc.php @@ -59,15 +59,18 @@ if ($services['total']) } ### FIXME - split this into overview/syslog.inc.php? -$syslog = dbFetchRows("SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog WHERE device_id = ? ORDER BY timestamp DESC LIMIT 20", array($device['device_id'])); -if (count($syslog)) +if ($config['enable_syslog']) { - echo("
"); - echo('

Recent Syslog

'); - echo(""); - foreach ($syslog as $entry) { include("includes/print-syslog.inc.php"); } - echo("
"); - echo("
"); + $syslog = dbFetchRows("SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog WHERE device_id = ? ORDER BY timestamp DESC LIMIT 20", array($device['device_id'])); + if (count($syslog)) + { + echo("
"); + echo('

Recent Syslog

'); + echo(""); + foreach ($syslog as $entry) { include("includes/print-syslog.inc.php"); } + echo("
"); + echo("
"); + } } echo("");