thomascube
2008-04-05 e70d6ea64e711096af36b1234f8545b870ea5f45
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
?>
?>