diff options
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/node.admin.inc | 2 | ||||
-rw-r--r-- | modules/node/node.install | 4 | ||||
-rw-r--r-- | modules/node/node.module | 18 |
3 files changed, 12 insertions, 12 deletions
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index 29005bb94..e9cdeaa00 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -483,7 +483,7 @@ function node_admin_nodes() { $filter = node_build_filter_query(); $sort = tablesort_sql($header, '', 'n.changed DESC'); - $result = pager_query(db_rewrite_sql('SELECT n.*, u.name FROM {node} n '. $filter['join'] .' INNER JOIN {users} u ON n.uid = u.uid '. $filter['where'] . $sort), 50, 0, NULL, $filter['args']); + $result = pager_query(db_rewrite_sql('SELECT n.*, u.name FROM {node} n '. $filter['join'] .' INNER JOIN {user} u ON n.uid = u.uid '. $filter['where'] . $sort), 50, 0, NULL, $filter['args']); // Build the 'Update options' form. $form['options'] = array( diff --git a/modules/node/node.install b/modules/node/node.install index d0867f328..77063da92 100644 --- a/modules/node/node.install +++ b/modules/node/node.install @@ -43,7 +43,7 @@ function node_schema() { 'default' => '', ), 'uid' => array( - 'description' => 'The {users}.uid that owns this node; initially, this is the user that created it.', + 'description' => 'The {user}.uid that owns this node; initially, this is the user that created it.', 'type' => 'int', 'not null' => TRUE, 'default' => 0, @@ -227,7 +227,7 @@ function node_schema() { 'not null' => TRUE, ), 'uid' => array( - 'description' => 'The {users}.uid that created this version.', + 'description' => 'The {user}.uid that created this version.', 'type' => 'int', 'not null' => TRUE, 'default' => 0, diff --git a/modules/node/node.module b/modules/node/node.module index c70792f76..2f1d38bec 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -855,7 +855,7 @@ function node_load_multiple($nids = array(), $conditions = array(), $reset = FAL else { $query->join('node_revision', 'r', 'r.vid = n.vid'); } - $query->join('users', 'u', 'u.uid = n.uid'); + $query->join('user', 'u', 'u.uid = n.uid'); // Add fields from the {node} table. $node_fields = drupal_schema_fields_sql('node'); @@ -876,7 +876,7 @@ function node_load_multiple($nids = array(), $conditions = array(), $reset = FAL $query->addField('r', 'timestamp', 'revision_timestamp'); $query->fields('r', $node_revision_fields); - // Add fields from the {users} table. + // Add fields from the {user} table. $user_fields = array('name', 'picture', 'data'); $query->fields('u', $user_fields); @@ -1865,7 +1865,7 @@ function node_last_changed($nid) { */ function node_revision_list($node) { $revisions = array(); - $result = db_query('SELECT r.vid, r.title, r.log, r.uid, n.vid AS current_vid, r.timestamp, u.name FROM {node_revision} r LEFT JOIN {node} n ON n.vid = r.vid INNER JOIN {users} u ON u.uid = r.uid WHERE r.nid = %d ORDER BY r.timestamp DESC', $node->nid); + $result = db_query('SELECT r.vid, r.title, r.log, r.uid, n.vid AS current_vid, r.timestamp, u.name FROM {node_revision} r LEFT JOIN {node} n ON n.vid = r.vid INNER JOIN {user} u ON u.uid = r.uid WHERE r.nid = %d ORDER BY r.timestamp DESC', $node->nid); while ($revision = db_fetch_object($result)) { $revisions[$revision->vid] = $revision; } @@ -3008,22 +3008,22 @@ function node_save_action($node) { */ function node_assign_owner_action(&$node, $context) { $node->uid = $context['owner_uid']; - $owner_name = db_result(db_query("SELECT name FROM {users} WHERE uid = %d", $context['owner_uid'])); + $owner_name = db_result(db_query("SELECT name FROM {user} WHERE uid = %d", $context['owner_uid'])); watchdog('action', 'Changed owner of @type %title to uid %name.', array('@type' => node_get_types('type', $node), '%title' => $node->title, '%name' => $owner_name)); } function node_assign_owner_action_form($context) { $description = t('The username of the user to which you would like to assign ownership.'); - $count = db_result(db_query("SELECT COUNT(*) FROM {users}")); + $count = db_result(db_query("SELECT COUNT(*) FROM {user}")); $owner_name = ''; if (isset($context['owner_uid'])) { - $owner_name = db_result(db_query("SELECT name FROM {users} WHERE uid = %d", $context['owner_uid'])); + $owner_name = db_result(db_query("SELECT name FROM {user} WHERE uid = %d", $context['owner_uid'])); } // Use dropdown for fewer than 200 users; textbox for more than that. if (intval($count) < 200) { $options = array(); - $result = db_query("SELECT uid, name FROM {users} WHERE uid > 0 ORDER BY name"); + $result = db_query("SELECT uid, name FROM {user} WHERE uid > 0 ORDER BY name"); while ($data = db_fetch_object($result)) { $options[$data->name] = $data->name; } @@ -3050,7 +3050,7 @@ function node_assign_owner_action_form($context) { } function node_assign_owner_action_validate($form, $form_state) { - $count = db_result(db_query("SELECT COUNT(*) FROM {users} WHERE name = '%s'", $form_state['values']['owner_name'])); + $count = db_result(db_query("SELECT COUNT(*) FROM {user} WHERE name = '%s'", $form_state['values']['owner_name'])); if (intval($count) != 1) { form_set_error('owner_name', t('Please enter a valid username.')); } @@ -3058,7 +3058,7 @@ function node_assign_owner_action_validate($form, $form_state) { function node_assign_owner_action_submit($form, $form_state) { // Username can change, so we need to store the ID, not the username. - $uid = db_result(db_query("SELECT uid from {users} WHERE name = '%s'", $form_state['values']['owner_name'])); + $uid = db_result(db_query("SELECT uid from {user} WHERE name = '%s'", $form_state['values']['owner_name'])); return array('owner_uid' => $uid); } |