Adding fix for Ticket #2084

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4574 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-03-04 05:19:30 +00:00
parent ba89ee9298
commit 55a66a9091

View file

@ -1354,6 +1354,7 @@ class DboSource extends DataSource {
for($i = 0; $i < $pregCount; $i++) {
if (!empty($match['1'][$i]) && !is_numeric($match['1'][$i])) {
$conditions = $conditions . ' ';
$match['0'][$i] = preg_replace('/\\./', '\\.', $match['0'][$i]);
$conditions = preg_replace('/^' . $match['0'][$i] . '(?=[^\\w])/', ' '.$this->name($match['1'][$i]), $conditions);
if (strpos($conditions, '(' . $match['0'][$i]) === false) {
$conditions = preg_replace('/[^\w]' . $match['0'][$i] . '(?=[^\\w])/', ' '.$this->name($match['1'][$i]), $conditions);