summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-08-11 14:14:46 +0000
committerDries Buytaert <dries@buytaert.net>2007-08-11 14:14:46 +0000
commita5fcb369fb411d8ed3a945105a89a146ab96052e (patch)
tree0180d0a3acb057be7fd5fa49b320ae67fb522fb6 /modules
parent15c68075d9fe8350a78a9ac5969ecff1be2cee49 (diff)
downloadbrdo-a5fcb369fb411d8ed3a945105a89a146ab96052e.tar.gz
brdo-a5fcb369fb411d8ed3a945105a89a146ab96052e.tar.bz2
- Patch #166205 by hswong3i: improved database compatibility of db_result(). Makes it work with DB2, Oracle, etc.
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/comment.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 3f23fdd78..b5eccdef1 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1398,7 +1398,7 @@ function comment_validate($edit) {
if (!$user->uid || isset($edit['is_anonymous'])) {
if (variable_get('comment_anonymous', COMMENT_ANONYMOUS_MAYNOT_CONTACT) > COMMENT_ANONYMOUS_MAYNOT_CONTACT) {
if ($edit['name']) {
- $taken = db_result(db_query("SELECT COUNT(uid) FROM {users} WHERE LOWER(name) = '%s'", $edit['name']), 0);
+ $taken = db_result(db_query("SELECT COUNT(uid) FROM {users} WHERE LOWER(name) = '%s'", $edit['name']));
if ($taken != 0) {
form_set_error('name', t('The name you used belongs to a registered user.'));