diff options
author | brunoais <brunoaiss@gmail.com> | 2015-03-16 11:31:51 +0000 |
---|---|---|
committer | brunoais <brunoaiss@gmail.com> | 2015-03-17 20:31:26 +0000 |
commit | 576eaa0cff7a5e051aa672034e596e90f65fc1a9 (patch) | |
tree | 47254eb48728b4a7cbe4fe9f86b49918958cbc77 /phpBB/phpbb/db/driver/driver.php | |
parent | bc6ea5796dcdabd57ff9e6f7640d724df67254c5 (diff) | |
download | forums-576eaa0cff7a5e051aa672034e596e90f65fc1a9.tar forums-576eaa0cff7a5e051aa672034e596e90f65fc1a9.tar.gz forums-576eaa0cff7a5e051aa672034e596e90f65fc1a9.tar.bz2 forums-576eaa0cff7a5e051aa672034e596e90f65fc1a9.tar.xz forums-576eaa0cff7a5e051aa672034e596e90f65fc1a9.zip |
[feature/sql-bool-builder] Adding the IS operator to predicted operators
PHPBB3-13652
Diffstat (limited to 'phpBB/phpbb/db/driver/driver.php')
-rw-r--r-- | phpBB/phpbb/db/driver/driver.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/driver/driver.php b/phpBB/phpbb/db/driver/driver.php index ce69ef6a52..4d78c84c8a 100644 --- a/phpBB/phpbb/db/driver/driver.php +++ b/phpBB/phpbb/db/driver/driver.php @@ -866,6 +866,24 @@ abstract class driver implements driver_interface break; + case 'IS_NOT': + + $condition[1] = 'IS NOT'; + + // no break + case 'IS': + + // If the value is NULL, the string of it is the empty string ('') which is not the intended result. + // this should solve that + if ($condition[2] === null) + { + $condition[2] = 'NULL'; + } + + $condition = implode(' ', $condition); + + break; + default: $condition = implode(' ', $condition); |