From 11ef977d13ce87390074591b1dded0796ffeefcd Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 02 Sep 2008 08:29:31 -0400
Subject: [PATCH] - fixed and re-enabled (RFC3501 [7.1]) CAPABILITY optional response use
---
program/include/rcube_mdb2.php | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php
index 9f2f30c..0588256 100644
--- a/program/include/rcube_mdb2.php
+++ b/program/include/rcube_mdb2.php
@@ -69,17 +69,6 @@
/**
- * PHP 4 object constructor
- *
- * @see rcube_mdb2::__construct
- */
- function rcube_db($db_dsnw,$db_dsnr='')
- {
- $this->__construct($db_dsnw,$db_dsnr);
- }
-
-
- /**
* Connect to specific database
*
* @param string DSN for DB connections
@@ -509,6 +498,27 @@
/**
+ * Return SQL statement for case insensitive LIKE
+ *
+ * @param string Field name
+ * @param string Search value
+ * @return string SQL statement to use in query
+ * @access public
+ */
+ function ilike($column, $value)
+ {
+ // TODO: use MDB2's matchPattern() function
+ switch($this->db_provider)
+ {
+ case 'pgsql':
+ return $this->quote_identifier($column).' ILIKE '.$this->quote($value);
+ default:
+ return $this->quote_identifier($column).' LIKE '.$this->quote($value);
+ }
+ }
+
+
+ /**
* Adds a query result and returns a handle ID
*
* @param object Query handle
--
Gitblit v1.9.1