diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-18 15:19:57 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-18 15:19:57 +0000 |
commit | ff9e842730ccf251cf8b76401e4df1b1c6edcea2 (patch) | |
tree | 2b10ab740305648bee997708b6d651a3816e3545 /modules/comment/comment.module | |
parent | df591c8f4032041613192e1b7836725f92ea7b10 (diff) | |
download | brdo-ff9e842730ccf251cf8b76401e4df1b1c6edcea2.tar.gz brdo-ff9e842730ccf251cf8b76401e4df1b1c6edcea2.tar.bz2 |
#330983 by recidive and boombatower: Rename users/users_roles tables to user/user_role for consistency.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 89c5c4557..d982a19f8 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1058,7 +1058,7 @@ function comment_render($node, $cid = 0) { $query->fields('c', array('cid', 'nid', 'pid', 'comment', 'subject', 'format', 'timestamp', 'name', 'mail', 'homepage', 'status') ); $query->fields('u', array( 'uid', 'signature', 'picture', 'data', 'status') ); $query->addField('u', 'name', 'registered_name'); - $query->innerJoin('users', 'u', 'c.uid = u.uid'); + $query->innerJoin('user', 'u', 'c.uid = u.uid'); $query->condition('c.cid', $cid); if (!user_access('administer comments')) { @@ -1084,7 +1084,7 @@ function comment_render($node, $cid = 0) { // Multiple comment view. $query_count = 'SELECT COUNT(*) FROM {comment} c WHERE c.nid = %d'; - $query = 'SELECT c.cid as cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.signature, u.picture, u.data, c.thread, c.status FROM {comment} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.nid = %d'; + $query = 'SELECT c.cid as cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.signature, u.picture, u.data, c.thread, c.status FROM {comment} c INNER JOIN {user} u ON c.uid = u.uid WHERE c.nid = %d'; $query_args = array($nid); if (!user_access('administer comments')) { @@ -1292,7 +1292,7 @@ function comment_validate($edit) { $node = node_load($edit['nid']); if (variable_get('comment_anonymous_' . $node->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT) > COMMENT_ANONYMOUS_MAYNOT_CONTACT) { if ($edit['name']) { - $query = db_select('users', 'u'); + $query = db_select('user', 'u'); $query->addField('u', 'uid', 'uid'); $taken = $query->where('LOWER(name) = :name', array(':name' => $edit['name'])) ->countQuery() @@ -1635,7 +1635,7 @@ function comment_form_add_preview($form, &$form_state) { $output = ''; // Isn't this line a duplication of the first $output above? if ($edit['pid']) { - $comment = db_query('SELECT c.*, u.uid, u.name AS registered_name, u.signature, u.picture, u.data FROM {comment} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = :cid AND c.status = :status', array( + $comment = db_query('SELECT c.*, u.uid, u.name AS registered_name, u.signature, u.picture, u.data FROM {comment} c INNER JOIN {user} u ON c.uid = u.uid WHERE c.cid = :cid AND c.status = :status', array( ':cid' => $edit['pid'], ':status' => COMMENT_PUBLISHED )) ->fetchObject(); |