]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Added connection options and fixed typo in php code
authorDavide Franco <bacula-dev@dflc.ch>
Sun, 26 Jun 2011 15:00:25 +0000 (17:00 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:16 +0000 (14:49 +0200)
gui/bacula-web/includes/bweb.inc.php

index e14ed2eb66d536976de745761f92e542846cb078..d5918c6fcdf2b5e56a149295cc2996d84c27c440 100644 (file)
@@ -44,7 +44,8 @@ class Bweb extends DB
                        $dsn = $this->bwcfg->Get_Dsn( 0 );
                
                // Connect to the database
-               $this->db_link = $this->connect( $dsn );
+               $options = array( 'portability' => DB_PORTABILITY_ALL );
+               $this->db_link = $this->connect( $dsn, $options );
         
                if (DB::isError($this->db_link)) {
                        die( 'Unable to connect to catalog <br />' . $this->db_link->getMessage());
@@ -421,13 +422,10 @@ class Bweb extends DB
                }
        } // end function GetJobsStatistics()
        
-       public function CountVolumesByPool( $pools )
+       public function CountVolumesByPool( $pool_id )
        {
                foreach( $pools as $pool_name => $pool ) {
-                       //var_dump( $pool );
-                       $query = "SELECT COUNT(*) AS nb_vol FROM Media WHERE PoolId = '$pool'";
-                       //echo $query . '<br />';
-                       //echo 'Pool name ' . $pool_name . '<br />';
+                       $query = "SELECT COUNT(*) AS nb_vol FROM Media WHERE PoolId = '$pool_id'";
                        $result = $this->db_link->query( $query );
                        
                        if( PEAR::isError( $result ) ) {