Adding patch from #1844

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4394 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-02-01 23:58:02 +00:00
parent 03d15ff892
commit ce033247ed

View file

@ -1416,7 +1416,7 @@ class DboSource extends DataSource {
$data = $this->name($key) . ' IS NULL'; $data = $this->name($key) . ' IS NULL';
} elseif($value === '') { } elseif($value === '') {
$data = $this->name($key) . " = ''"; $data = $this->name($key) . " = ''";
} elseif (preg_match('/^([a-z]*\\([a-z0-9]*\\)\\x20?|(?:' . join('\\x20)|(?:', $this->__sqlOps) . '\\x20)|[<> = !]{1,3}\\x20?)?(.*)/i', $value, $match)) { } elseif (preg_match('/^([a-z]*\\([a-z0-9]*\\)\\x20?|(?:' . join('\\x20)|(?:', $this->__sqlOps) . '\\x20)|<=?(?![^>]+>)\\x20?|[>=!]{1,3}(?!<)\\x20?)?(.*)/i', $value, $match)) {
if (preg_match('/(\\x20[\\w]*\\x20)/', $key, $regs)) { if (preg_match('/(\\x20[\\w]*\\x20)/', $key, $regs)) {
$clause = $regs['1']; $clause = $regs['1'];
$key = preg_replace('/' . $regs['1'] . '/', '', $key); $key = preg_replace('/' . $regs['1'] . '/', '', $key);