From 0d94fd45f422fe0d0460f5db7a7761f56bc18236 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 19 Jun 2012 04:46:41 -0400
Subject: [PATCH] New database layer based on PHP PDO

---
 program/include/rcube.php |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/program/include/rcube.php b/program/include/rcube.php
index 1bfe93d..3e43ace 100644
--- a/program/include/rcube.php
+++ b/program/include/rcube.php
@@ -49,14 +49,14 @@
   /**
    * Instace of database class.
    *
-   * @var rcube_mdb2
+   * @var rcube_pdo
    */
   public $db;
 
   /**
    * Instace of Memcache class.
    *
-   * @var rcube_mdb2
+   * @var Memcache
    */
   public $memcache;
 
@@ -158,15 +158,13 @@
   /**
    * Get the current database connection
    *
-   * @return rcube_mdb2  Database connection object
+   * @return rcube_pdo  Database connection object
    */
   public function get_dbh()
   {
     if (!$this->db) {
       $config_all = $this->config->all();
-
-      $this->db = new rcube_mdb2($config_all['db_dsnw'], $config_all['db_dsnr'], $config_all['db_persistent']);
-      $this->db->sqlite_initials = INSTALL_PATH . 'SQL/sqlite.initial.sql';
+      $this->db = rcube_db::factory($config_all['db_dsnw'], $config_all['db_dsnr'], $config_all['db_persistent']);
       $this->db->set_debug((bool)$config_all['sql_debug']);
     }
 

--
Gitblit v1.9.1