From e70d6ea64e711096af36b1234f8545b870ea5f45 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Sat, 05 Apr 2008 08:49:21 -0400
Subject: [PATCH] Apply changes from trunk to 0.1-stable

---
 program/include/rcube_db.inc |   35 ++++++++++++++++++++++++++++++-----
 1 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/program/include/rcube_db.inc b/program/include/rcube_db.inc
index 626cb64..63c6759 100644
--- a/program/include/rcube_db.inc
+++ b/program/include/rcube_db.inc
@@ -25,15 +25,14 @@
 /**
  * Obtain the PEAR::DB class that is used for abstraction
  */
-require_once('DB.php');
-
+require_once 'DB.php';
 
 /**
  * Database independent query interface
  *
  * This is a wrapper for the PEAR::DB class
  *
- * @package    RoundCube Webmail
+ * @package    Database
  * @author     David Saez Padros <david@ols.es>
  * @author     Thomas Bruederli <roundcube@gmail.com>
  * @version    1.17
@@ -154,8 +153,18 @@
     $this->db_handle = $this->dsn_connect($dsn);
     $this->db_connected = $this->db_handle ? TRUE : FALSE;
     }
+
+
+  /**
+   * Activate/deactivate debug mode
+   * (not implemented)
+   */
+  function set_debug($dbg = true)
+  {
     
-    
+  }
+
+
   /**
    * Getter for error state
    *
@@ -426,6 +435,22 @@
     }
 
 
+  /**
+   * Escapes a string
+   *
+   * @param  string  The string to be escaped
+   * @return string  The escaped string
+   * @access public
+   */
+  function escapeSimple($str)
+    {
+    if (!$this->db_handle)
+      $this->db_connect('r');
+
+    return $this->db_handle->escapeSimple($str);
+    }
+
+
   /*
    * Return SQL function for current time and date
    *
@@ -580,4 +605,4 @@
 
   }  // end class rcube_db
 
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1