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