From: Davide Franco Date: Mon, 27 Jun 2011 15:21:25 +0000 (+0200) Subject: bacula-web: Improved php code in CountJobsbyLevel() function X-Git-Tag: Release-5.2.1~259 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=19caf31818289895328ca0f98c6daa2213e560f8;p=bacula%2Fbacula bacula-web: Improved php code in CountJobsbyLevel() function --- 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']; }