roundcubemail/program/lib/Roundcube/rcube.php
public function get_dbh()
    {
        if (!$this->db) {
            $this->db = rcube_db::factory(
                $this->config->get('db_dsnw'),
                $this->config->get('db_dsnr'),
                $this->config->get('db_persistent')
            );

            $this->db->set_debug((bool)$this->config->get('sql_debug'));
        }

        return $this->db;
    }
public function get_dbh()
    {
        if (!$this->db) {
            $this->db = rcube_db::factory(
                $this->config->get('db_dsnw'),
                $this->config->get('db_dsnr'),
                $this->config->get('db_persistent')
            );

            $this->db->set_debug((bool)$this->config->get('sql_debug'));
        }

        return $this->db;
    }
public function get_dbh ( ) { if ( ! $ this -> db ) { $ this -> db = rcube_db :: factory ( $ this -> config -> get ( 'db_dsnw' ) , $ this -> config -> get ( 'db_dsnr' ) , $ this -> config -> get ( 'db_persistent' ) ) ; $ this -> db -> set_debug ( ( bool ) $ this -> config -> get ( 'sql_debug' ) ) ; } return $ this -> db ; }
Get the current database connection

@return rcube_db Database object
Get the current database connection