From: Meik S. <acy...@ph...> - 2009-10-30 17:21:40
|
Author: acydburn Date: Fri Oct 30 17:21:20 2009 New Revision: 10247 Log: Fix another bug in WHERE statement rewrite for oracle. The bug(s) actually consist of not detecting correct parameters and then resulting in partial WHERE statements, where non-detected strings are simply removed. grrrrrr Modified: branches/phpBB-3_0_0/phpBB/includes/db/oracle.php Modified: branches/phpBB-3_0_0/phpBB/includes/db/oracle.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/db/oracle.php (original) --- branches/phpBB-3_0_0/phpBB/includes/db/oracle.php Fri Oct 30 17:21:20 2009 *************** *** 136,142 **** */ function _rewrite_where($where_clause) { ! preg_match_all('/\s*(AND|OR)?\s*([\w_.()]++)\s*(?:(=|<[=>]?|>=?)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.()]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER); $out = ''; foreach ($result as $val) { --- 136,142 ---- */ function _rewrite_where($where_clause) { ! preg_match_all('/\s*(AND|OR)?\s*([\w_.()]++)\s*(?:(=|<[=>]?|>=?|LIKE)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.()]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER); $out = ''; foreach ($result as $val) { |