mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 19:12:42 +00:00
Adding fix for Ticket #2812
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5335 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f72cdb6670
commit
50aca85cc9
1 changed files with 7 additions and 2 deletions
|
@ -1561,6 +1561,7 @@ function conditionKeysToString($conditions, $quoteValues = true) {
|
|||
$key = preg_replace('/' . $regs['1'] . '/', '', $key);
|
||||
}
|
||||
|
||||
$not = false;
|
||||
$mValue = trim($match['1']);
|
||||
if (empty($match['1'])) {
|
||||
$match['1'] = ' = ';
|
||||
|
@ -1570,9 +1571,13 @@ function conditionKeysToString($conditions, $quoteValues = true) {
|
|||
} elseif (!isset($match['2'])) {
|
||||
$match['1'] = ' = ';
|
||||
$match['2'] = $match['0'];
|
||||
} else if(low($mValue) == 'not') {
|
||||
$not = $this->conditionKeysToString(array($mValue => array($key => $match[2])), $quoteValues);
|
||||
}
|
||||
|
||||
if (strpos($match['2'], '-!') === 0) {
|
||||
if($not) {
|
||||
$data = $not[0];
|
||||
} elseif (strpos($match['2'], '-!') === 0) {
|
||||
$match['2'] = str_replace('-!', '', $match['2']);
|
||||
$data = $this->name($key) . ' ' . $match['1'] . ' ' . $match['2'];
|
||||
} else {
|
||||
|
@ -1813,4 +1818,4 @@ function conditionKeysToString($conditions, $quoteValues = true) {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue