// SQLite bacula catalog
  $config[0]['label'] = 'Dev backup server';
- $config[0]['db_path'] = '/path/to/database/db.sdb';
+ $config[0]['db_name'] = '/path/to/database/db.sdb';
 
  If you want to configure more than one catalog in Bacula-Web, just copy the first parameters and increment by one the index
 
 
                $dsn['phptype']  = $this->catalogs[$catalog_id]["db_type"];
                return $dsn;
        }
+       
+       public function getDSN( $catalog_id ) 
+       {
+               $dsn = '';
+               
+               switch( $this->catalogs[$catalog_id]['db_type'] )
+               {
+                       case 'mysql':
+                       case 'pgsql':
+                               $dsn  = $this->catalogs[$catalog_id]['db_type'] . ':';
+                               $dsn .= 'dbname=' . $this->catalogs[$catalog_id]['db_name'] . ';';
+                               $dsn .= 'host=' . $this->catalogs[$catalog_id]['host'];
+                       break;
+                       case 'sqlite':
+                               $dsn  = $this->catalogs[$catalog_id]['db_type'] . ':' . $this->catalogs[$catalog_id]['db_name'];
+                       break;
+               }
+               
+               return $dsn;            
+       }
                
        function __destruct()
        {