From e23bdd4d3af8ab5eb9d04b62442bc43697d6ee4d Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Mon, 27 Jun 2011 17:21:25 +0200 Subject: [PATCH] bacula-web: Improved php code in CountJobsbyLevel() function --- gui/bacula-web/includes/bweb.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/bacula-web/includes/bweb.inc.php b/gui/bacula-web/includes/bweb.inc.php index d4867d9581..081e9e7794 100644 --- a/gui/bacula-web/includes/bweb.inc.php +++ b/gui/bacula-web/includes/bweb.inc.php @@ -266,9 +266,9 @@ class Bweb extends DB $result = $this->db_link->query( $query ); if (PEAR::isError( $result ) ) { - die( "Unable to get number of jobs with $level status from catalog
" . $result->getMessage() ); + $this->TriggerDBError( 'Unable to get number of jobs with ' . $level . ' status from catalog', $result); }else { - $jobs = $result->fetchRow( DB_FETCHMODE_ASSOC ); + $jobs = $result->fetchRow(); return $jobs['jobs']; } -- 2.39.5