From: Davide Franco Date: Mon, 27 Jun 2011 14:53:54 +0000 (+0200) Subject: bacula-web: Improved GetDBSize() function X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ed61e0b732fa79bba182222758086f63337168cf;p=bacula%2Fbacula bacula-web: Improved GetDBSize() function - Removed useless fetch mode (as the default mode already defined) - Used TriggerDBEror() function in db query exception --- diff --git a/gui/bacula-web/includes/bweb.inc.php b/gui/bacula-web/includes/bweb.inc.php index a7fc2cfd4c..d4867d9581 100644 --- a/gui/bacula-web/includes/bweb.inc.php +++ b/gui/bacula-web/includes/bweb.inc.php @@ -149,10 +149,10 @@ class Bweb extends DB if(! PEAR::isError( $result ) ) { - $db = $result->fetchRow( DB_FETCHMODE_ASSOC ); + $db = $result->fetchRow(); $database_size = $db['dbsize']; }else - die( "Unable to get database size
" . $result->getMessage() ); + $this->TriggerDBError( 'Unable to get database size', $result); return CUtils::Get_Human_Size( $database_size ); } // end function GetDbSize()