]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Improved php code in CountJobsbyLevel() function
authorDavide Franco <bacula-dev@dflc.ch>
Mon, 27 Jun 2011 15:21:25 +0000 (17:21 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:17 +0000 (14:49 +0200)
gui/bacula-web/includes/bweb.inc.php

index d4867d9581dcd0772f62fc432a5ffb0abb5cc16b..081e9e77945161ee34ae4122665a1a6af2dfa751 100644 (file)
@@ -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 <br />" . $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'];
                }