diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-26 07:30:29 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-02-26 07:30:29 +0000 |
commit | 665c9fdc2ca50f7960c16b375685485b3eb8b1cc (patch) | |
tree | 273088dccb033efaf0e7ed718e6041842e32c7ae /modules/comment | |
parent | 116de1793300f2aee3d71297c26ec448f8141196 (diff) | |
download | brdo-665c9fdc2ca50f7960c16b375685485b3eb8b1cc.tar.gz brdo-665c9fdc2ca50f7960c16b375685485b3eb8b1cc.tar.bz2 |
Roll-back of users -> user table name change in #330983: Broken pgsql is no fun.
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.admin.inc | 6 | ||||
-rw-r--r-- | modules/comment/comment.install | 4 | ||||
-rw-r--r-- | modules/comment/comment.module | 8 | ||||
-rw-r--r-- | modules/comment/comment.pages.inc | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/modules/comment/comment.admin.inc b/modules/comment/comment.admin.inc index 8d88ec77e..d669fe5e7 100644 --- a/modules/comment/comment.admin.inc +++ b/modules/comment/comment.admin.inc @@ -67,7 +67,7 @@ function comment_admin_overview($type = 'new', $arg) { ); $query = db_select('comment', 'c'); - $query->join('user', 'u', 'u.uid = c.uid'); + $query->join('users', 'u', 'u.uid = c.uid'); $query->join('node', 'n', 'n.nid = c.nid'); $query->addField('u', 'name', 'registered_name'); $query->addField('n', 'title', 'node_title'); @@ -218,7 +218,7 @@ function comment_multiple_delete_confirm_submit($form, &$form_state) { * The comment to be deleted. */ function comment_delete($cid = NULL) { - $comment = db_fetch_object(db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comment} c INNER JOIN {user} u ON u.uid = c.uid WHERE c.cid = %d', $cid)); + $comment = db_fetch_object(db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comment} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.cid = %d', $cid)); $comment->name = $comment->uid ? $comment->registered_name : $comment->name; $output = ''; @@ -285,7 +285,7 @@ function _comment_delete_thread($comment) { comment_invoke_comment($comment, 'delete'); // Delete the comment's replies. - $result = db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comment} c INNER JOIN {user} u ON u.uid = c.uid WHERE pid = %d', $comment->cid); + $result = db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comment} c INNER JOIN {users} u ON u.uid = c.uid WHERE pid = %d', $comment->cid); while ($comment = db_fetch_object($result)) { $comment->name = $comment->uid ? $comment->registered_name : $comment->name; _comment_delete_thread($comment); diff --git a/modules/comment/comment.install b/modules/comment/comment.install index 60b8b8e75..0ae7e1980 100644 --- a/modules/comment/comment.install +++ b/modules/comment/comment.install @@ -181,7 +181,7 @@ function comment_schema() { 'type' => 'int', 'not null' => TRUE, 'default' => 0, - 'description' => 'The {user}.uid who authored the comment. If set to 0, this comment was created by an anonymous user.', + 'description' => 'The {users}.uid who authored the comment. If set to 0, this comment was created by an anonymous user.', ), 'subject' => array( 'type' => 'varchar', @@ -234,7 +234,7 @@ function comment_schema() { 'type' => 'varchar', 'length' => 60, 'not null' => FALSE, - 'description' => "The comment author's name. Uses {user}.name if the user is logged in, otherwise uses the value typed into the comment form.", + 'description' => "The comment author's name. Uses {users}.name if the user is logged in, otherwise uses the value typed into the comment form.", ), 'mail' => array( 'type' => 'varchar', diff --git a/modules/comment/comment.module b/modules/comment/comment.module index d982a19f8..89c5c4557 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('user', 'u', 'c.uid = u.uid'); + $query->innerJoin('users', '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 {user} 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 {users} 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('user', 'u'); + $query = db_select('users', '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 {user} 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 {users} u ON c.uid = u.uid WHERE c.cid = :cid AND c.status = :status', array( ':cid' => $edit['pid'], ':status' => COMMENT_PUBLISHED )) ->fetchObject(); diff --git a/modules/comment/comment.pages.inc b/modules/comment/comment.pages.inc index 93e93e8b5..dd88ad514 100644 --- a/modules/comment/comment.pages.inc +++ b/modules/comment/comment.pages.inc @@ -15,7 +15,7 @@ */ function comment_edit($cid) { global $user; - $comment = db_query('SELECT c.*, u.uid, u.name AS registered_name, u.data FROM {comment} c INNER JOIN {user} u ON c.uid = u.uid WHERE c.cid = :cid', array(':cid'=>$cid) )->fetchObject(); + $comment = db_query('SELECT c.*, u.uid, u.name AS registered_name, u.data FROM {comment} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = :cid', array(':cid'=>$cid) )->fetchObject(); $comment = drupal_unpack($comment); $comment->name = $comment->uid ? $comment->registered_name : $comment->name; @@ -69,7 +69,7 @@ function comment_reply($node, $pid = NULL) { // $pid indicates that this is a reply to a comment. if ($pid) { // Load the comment whose cid = $pid - $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( + $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( ':cid'=>$pid, ':status'=>COMMENT_PUBLISHED))->fetchObject(); if ( $comment ) { |