From f1360eed131273fdb4ea476e60a7d614778bb878 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 8 Mar 2012 06:24:33 +0000 Subject: [PATCH] fix bug regarding the rate (view/edit/search)Limit for mysql -> not set active as this fix breaks postgres; see lines 954 to 959 in wiki_so. Problem is caused by postgres behavior of recognizing columnnames, ... still to investigate r38303: always quote for postgreSQL, as this is the only way to support mixed case names r38307: fixing wiki rate code / mixed case column names for PostgreSQL --- phpgwapi/inc/class.egw_db.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.egw_db.inc.php b/phpgwapi/inc/class.egw_db.inc.php index 8a331387c3..db15d4d031 100644 --- a/phpgwapi/inc/class.egw_db.inc.php +++ b/phpgwapi/inc/class.egw_db.inc.php @@ -1341,7 +1341,9 @@ class egw_db } // if name contains special characters, quote it - if ( preg_match('/\W/', $name) ) { + // always quote for postgreSQL, as this is the only way to support mixed case names + if (preg_match('/\W/', $name) || $this->Type == 'pgsql' && preg_match('/[A-Z]+/', $name)) + { return $quote . $name . $quote; }