diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-10 13:49:52 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-10 13:49:52 +0000 |
commit | 3d0759974b3679aa75f23840e0b2f7c725091560 (patch) | |
tree | a64df09fffc666a99f171237f4d262493e88e26b /phpBB/includes/db | |
parent | 805af6f437c393f520cda114c94fad8c96e6085c (diff) | |
download | forums-3d0759974b3679aa75f23840e0b2f7c725091560.tar forums-3d0759974b3679aa75f23840e0b2f7c725091560.tar.gz forums-3d0759974b3679aa75f23840e0b2f7c725091560.tar.bz2 forums-3d0759974b3679aa75f23840e0b2f7c725091560.tar.xz forums-3d0759974b3679aa75f23840e0b2f7c725091560.zip |
- some fixes
- added script for easy adjustement of username_clean column within the users table (please see the note i added to the utf8_clean_string() function)
git-svn-id: file:///svn/phpbb/trunk@6561 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r-- | phpBB/includes/db/dbal.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index 1fee674f80..d2d3efedaa 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -298,19 +298,16 @@ class dbal $array = array($array); } - $values = array(); - foreach ($array as $var) + if (sizeof($array) == 1) { - $values[] = $this->_sql_validate_value($var); - } + @reset($array); + $var = current($array); - if (sizeof($values) == 1) - { - return $field . ($negate ? ' <> ' : ' = ') . $values[0]; + return $field . ($negate ? ' <> ' : ' = ') . $this->_sql_validate_value($var); } else { - return $field . ($negate ? ' NOT IN ' : ' IN ' ) . '(' . implode(', ', $values) . ')'; + return $field . ($negate ? ' NOT IN ' : ' IN ' ) . '(' . implode(', ', array_map(array($this, '_sql_validate_value'), $array)) . ')'; } } |