]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Improved GetDBSize() function
authorDavide Franco <bacula-dev@dflc.ch>
Mon, 27 Jun 2011 14:53:54 +0000 (16:53 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:17 +0000 (14:49 +0200)
 - Removed useless fetch mode (as the default mode already defined)
 - Used TriggerDBEror() function in db query exception

gui/bacula-web/includes/bweb.inc.php

index a7fc2cfd4cbde74f3e5a5aa46ed898f72830620e..d4867d9581dcd0772f62fc432a5ffb0abb5cc16b 100644 (file)
@@ -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<br />" . $result->getMessage() );
+                       $this->TriggerDBError( 'Unable to get database size', $result);
                
                return CUtils::Get_Human_Size( $database_size );
        } // end function GetDbSize()