diff options
| author | Nils Adermann <naderman@naderman.de> | 2007-01-13 22:32:03 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2007-01-13 22:32:03 +0000 |
| commit | e6421f9274d3932539974790db1fcf81027a4db5 (patch) | |
| tree | cf333c81622a49349ae1c089fc68dc5ade37204e /phpBB/includes/db | |
| parent | 9372acd0170cf255dd0a1551479e6d75c7af7008 (diff) | |
| download | forums-e6421f9274d3932539974790db1fcf81027a4db5.tar forums-e6421f9274d3932539974790db1fcf81027a4db5.tar.gz forums-e6421f9274d3932539974790db1fcf81027a4db5.tar.bz2 forums-e6421f9274d3932539974790db1fcf81027a4db5.tar.xz forums-e6421f9274d3932539974790db1fcf81027a4db5.zip | |
- solved a problem with magic urls inside brackets, and with bbcodes being treated as IPv6 addresses
- turn NOT IN () and IN () into 1=1 and 1=0 so the database will understand it, instead of throwing an error in sql_in_set [Bug #7118]
- some tiny fixes to fulltext_native
git-svn-id: file:///svn/phpbb/trunk@6886 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db')
| -rw-r--r-- | phpBB/includes/db/dbal.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index f4cbe0e2d4..1f48909d43 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -289,8 +289,16 @@ class dbal { if (!sizeof($array)) { - // Not optimal, but at least the backtrace should help in identifying where the problem lies. - $this->sql_error('No values specified for SQL IN comparison'); + // NOT IN () actually means everything so use a tautology + if ($negate) + { + return '1=1'; + } + // IN () actually means nothing so use a contradiction + else + { + return '1=0'; + } } if (!is_array($array)) |
