Index: modules/comment/comment.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.install,v
retrieving revision 1.30
diff -u -r1.30 comment.install
--- modules/comment/comment.install 31 Jan 2009 16:31:59 -0000 1.30
+++ modules/comment/comment.install 16 Feb 2009 23:19:09 -0000
@@ -181,7 +181,7 @@
'type' => 'int',
'not null' => TRUE,
'default' => 0,
- 'description' => 'The {users}.uid who authored the comment. If set to 0, this comment was created by an anonymous user.',
+ 'description' => 'The {user}.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 @@
'type' => 'varchar',
'length' => 60,
'not null' => FALSE,
- 'description' => "The comment author's name. Uses {users}.name if the user is logged in, otherwise uses the value typed into the comment form.",
+ 'description' => "The comment author's name. Uses {user}.name if the user is logged in, otherwise uses the value typed into the comment form.",
),
'mail' => array(
'type' => 'varchar',
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.692
diff -u -r1.692 comment.module
--- modules/comment/comment.module 7 Feb 2009 20:10:40 -0000 1.692
+++ modules/comment/comment.module 16 Feb 2009 23:19:10 -0000
@@ -1058,7 +1058,7 @@
$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 @@
// 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 @@
$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 @@
$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();
Index: modules/comment/comment.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.pages.inc,v
retrieving revision 1.13
diff -u -r1.13 comment.pages.inc
--- modules/comment/comment.pages.inc 31 Jan 2009 16:19:29 -0000 1.13
+++ modules/comment/comment.pages.inc 16 Feb 2009 23:19:10 -0000
@@ -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 {users} 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 {user} 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 @@
// $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 {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'=>$pid,
':status'=>COMMENT_PUBLISHED))->fetchObject();
if ( $comment ) {
Index: modules/comment/comment.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v
retrieving revision 1.13
diff -u -r1.13 comment.admin.inc
--- modules/comment/comment.admin.inc 28 Jan 2009 07:43:26 -0000 1.13
+++ modules/comment/comment.admin.inc 16 Feb 2009 23:19:09 -0000
@@ -66,7 +66,7 @@
'operations' => array('data' => t('Operations')),
);
- $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid, n.title as node_title FROM {comment} c INNER JOIN {users} u ON u.uid = c.uid INNER JOIN {node} n ON n.nid = c.nid WHERE c.status = %d' . tablesort_sql($header), 50, 0, NULL, $status);
+ $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid, n.title as node_title FROM {comment} c INNER JOIN {user} u ON u.uid = c.uid INNER JOIN {node} n ON n.nid = c.nid WHERE c.status = %d' . tablesort_sql($header), 50, 0, NULL, $status);
// Build a table listing the appropriate comments.
$options = array();
@@ -205,7 +205,7 @@
* 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 {users} 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 {user} u ON u.uid = c.uid WHERE c.cid = %d', $cid));
$comment->name = $comment->uid ? $comment->registered_name : $comment->name;
$output = '';
@@ -272,7 +272,7 @@
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 {users} 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 {user} 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);
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.37
diff -u -r1.37 user.admin.inc
--- modules/user/user.admin.inc 3 Feb 2009 18:55:32 -0000 1.37
+++ modules/user/user.admin.inc 16 Feb 2009 23:19:16 -0000
@@ -144,9 +144,9 @@
t('Operations')
);
- $sql = 'SELECT DISTINCT u.uid, u.name, u.status, u.created, u.access FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid ' . $filter['join'] . ' WHERE u.uid != 0 ' . $filter['where'];
+ $sql = 'SELECT DISTINCT u.uid, u.name, u.status, u.created, u.access FROM {user} u LEFT JOIN {user_role} ur ON u.uid = ur.uid ' . $filter['join'] . ' WHERE u.uid != 0 ' . $filter['where'];
$sql .= tablesort_sql($header);
- $query_count = 'SELECT COUNT(DISTINCT u.uid) FROM {users} u LEFT JOIN {users_roles} ur ON u.uid = ur.uid ' . $filter['join'] . ' WHERE u.uid != 0 ' . $filter['where'];
+ $query_count = 'SELECT COUNT(DISTINCT u.uid) FROM {user} u LEFT JOIN {user_role} ur ON u.uid = ur.uid ' . $filter['join'] . ' WHERE u.uid != 0 ' . $filter['where'];
$result = pager_query($sql, 50, 0, $query_count, $filter['args']);
$form['options'] = array(
@@ -178,13 +178,13 @@
$accounts[$account->uid] = '';
$form['name'][$account->uid] = array('#markup' => theme('username', $account));
$form['status'][$account->uid] = array('#markup' => $status[$account->status]);
- $users_roles = array();
- $roles_result = db_query('SELECT rid FROM {users_roles} WHERE uid = %d', $account->uid);
+ $user_role = array();
+ $roles_result = db_query('SELECT rid FROM {user_role} WHERE uid = %d', $account->uid);
while ($user_role = db_fetch_object($roles_result)) {
- $users_roles[] = $roles[$user_role->rid];
+ $user_role[] = $roles[$user_role->rid];
}
- asort($users_roles);
- $form['roles'][$account->uid][0] = array('#markup' => theme('item_list', $users_roles));
+ asort($user_role);
+ $form['roles'][$account->uid][0] = array('#markup' => theme('item_list', $user_role));
$form['member_for'][$account->uid] = array('#markup' => format_interval(REQUEST_TIME - $account->created));
$form['last_access'][$account->uid] = array('#markup' => $account->access ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $account->access))) : t('never'));
$form['operations'][$account->uid] = array('#markup' => l(t('edit'), "user/$account->uid/edit", array('query' => $destination)));
@@ -736,7 +736,7 @@
db_query('DELETE FROM {role} WHERE rid = %d', $form_state['values']['rid']);
db_query('DELETE FROM {role_permission} WHERE rid = %d', $form_state['values']['rid']);
// Update the users who have this role set:
- db_query('DELETE FROM {users_roles} WHERE rid = %d', $form_state['values']['rid']);
+ db_query('DELETE FROM {user_role} WHERE rid = %d', $form_state['values']['rid']);
drupal_set_message(t('The role has been deleted.'));
}
Index: modules/user/user.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.install,v
retrieving revision 1.17
diff -u -r1.17 user.install
--- modules/user/user.install 20 Jan 2009 03:10:00 -0000 1.17
+++ modules/user/user.install 16 Feb 2009 23:19:17 -0000
@@ -18,7 +18,7 @@
'type' => 'int',
'not null' => TRUE,
'default' => 0,
- 'description' => "User's {users}.uid.",
+ 'description' => "User's {user}.uid.",
),
'authname' => array(
'type' => 'varchar',
@@ -87,7 +87,7 @@
'primary key' => array('rid'),
);
- $schema['users'] = array(
+ $schema['user'] = array(
'description' => 'Stores user data.',
'fields' => array(
'uid' => array(
@@ -201,7 +201,7 @@
'primary key' => array('uid'),
);
- $schema['users_roles'] = array(
+ $schema['user_role'] = array(
'description' => 'Maps users to roles.',
'fields' => array(
'uid' => array(
@@ -209,7 +209,7 @@
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
- 'description' => 'Primary Key: {users}.uid for user.',
+ 'description' => 'Primary Key: {user}.uid for user.',
),
'rid' => array(
'type' => 'int',
@@ -245,9 +245,9 @@
$hash_count_log2 = 11;
// Multi-part update.
if (!isset($sandbox['user_from'])) {
- db_change_field($ret, 'users', 'pass', 'pass', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''));
+ db_change_field($ret, 'user', 'pass', 'pass', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''));
$sandbox['user_from'] = 0;
- $sandbox['user_count'] = db_result(db_query("SELECT COUNT(uid) FROM {users}"));
+ $sandbox['user_count'] = db_result(db_query("SELECT COUNT(uid) FROM {user}"));
}
else {
require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
@@ -255,21 +255,21 @@
$has_rows = FALSE;
// Update this many per page load.
$count = 1000;
- $result = db_query_range("SELECT uid, pass FROM {users} WHERE uid > 0 ORDER BY uid", $sandbox['user_from'], $count);
+ $result = db_query_range("SELECT uid, pass FROM {user} WHERE uid > 0 ORDER BY uid", $sandbox['user_from'], $count);
while ($account = db_fetch_array($result)) {
$has_rows = TRUE;
$new_hash = user_hash_password($account['pass'], $hash_count_log2);
if ($new_hash) {
// Indicate an updated password.
$new_hash = 'U' . $new_hash;
- db_query("UPDATE {users} SET pass = '%s' WHERE uid = %d", $new_hash, $account['uid']);
+ db_query("UPDATE {user} SET pass = '%s' WHERE uid = %d", $new_hash, $account['uid']);
}
}
$ret['#finished'] = $sandbox['user_from']/$sandbox['user_count'];
$sandbox['user_from'] += $count;
if (!$has_rows) {
$ret['#finished'] = 1;
- $ret[] = array('success' => TRUE, 'query' => "UPDATE {users} SET pass = 'U' . user_hash_password(pass) WHERE uid > 0");
+ $ret[] = array('success' => TRUE, 'query' => "UPDATE {user} SET pass = 'U' . user_hash_password(pass) WHERE uid > 0");
}
}
return $ret;
@@ -464,6 +464,18 @@
}
/**
+ * Rename tables {users} to {user}, and {users_roles} to {user_role}.
+ */
+function user_update_7005() {
+ $ret = array();
+
+ db_rename_table($ret, 'users', 'user');
+ db_rename_table($ret, 'users_roles', 'user_role');
+
+ return $ret;
+}
+
+/**
* @} End of "defgroup user-updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/
Index: modules/user/user.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v
retrieving revision 1.28
diff -u -r1.28 user.pages.inc
--- modules/user/user.pages.inc 3 Feb 2009 17:30:13 -0000 1.28
+++ modules/user/user.pages.inc 16 Feb 2009 23:19:18 -0000
@@ -12,7 +12,7 @@
function user_autocomplete($string = '') {
$matches = array();
if ($string) {
- $result = db_query_range("SELECT name FROM {users} WHERE LOWER(name) LIKE LOWER(:name)", array(':name' => $string .'%'), 0, 10);
+ $result = db_query_range("SELECT name FROM {user} WHERE LOWER(name) LIKE LOWER(:name)", array(':name' => $string .'%'), 0, 10);
while ($user = db_fetch_object($result)) {
$matches[$user->name] = check_plain($user->name);
}
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.963
diff -u -r1.963 user.module
--- modules/user/user.module 9 Feb 2009 07:36:15 -0000 1.963
+++ modules/user/user.module 16 Feb 2009 23:19:17 -0000
@@ -196,7 +196,7 @@
$params[] = $value;
}
}
- $result = db_query('SELECT * FROM {users} u WHERE ' . implode(' AND ', $query), $params);
+ $result = db_query('SELECT * FROM {user} u WHERE ' . implode(' AND ', $query), $params);
if ($user = db_fetch_object($result)) {
$user = drupal_unpack($user);
@@ -208,7 +208,7 @@
else {
$user->roles[DRUPAL_ANONYMOUS_RID] = 'anonymous user';
}
- $result = db_query('SELECT r.rid, r.name FROM {role} r INNER JOIN {users_roles} ur ON ur.rid = r.rid WHERE ur.uid = %d', $user->uid);
+ $result = db_query('SELECT r.rid, r.name FROM {role} r INNER JOIN {user_role} ur ON ur.rid = r.rid WHERE ur.uid = %d', $user->uid);
while ($role = db_fetch_object($result)) {
$user->roles[$role->rid] = $role->name;
}
@@ -254,7 +254,7 @@
* A fully-loaded $user object upon successful save or FALSE if the save failed.
*/
function user_save($account, $edit = array(), $category = 'account') {
- $table = drupal_get_schema('users');
+ $table = drupal_get_schema('user');
$user_fields = $table['fields'];
if (!empty($edit['pass'])) {
@@ -285,7 +285,7 @@
if (is_object($account) && $account->uid) {
user_module_invoke('update', $edit, $account, $category);
- $data = unserialize(db_result(db_query('SELECT data FROM {users} WHERE uid = %d', $account->uid)));
+ $data = unserialize(db_result(db_query('SELECT data FROM {user} WHERE uid = %d', $account->uid)));
// Consider users edited by an administrator as logged in, if they haven't
// already, so anonymous users can view the profile (if allowed).
if (empty($edit['access']) && empty($account->access) && user_access('administer users')) {
@@ -293,7 +293,7 @@
}
foreach ($edit as $key => $value) {
// Form fields that don't pertain to the users, user_roles, or
- // Field API are automatically serialized into the users.data
+ // Field API are automatically serialized into the user.data
// column.
if ($key != 'roles' && empty($user_fields[$key]) && empty($field_form[$key])) {
if ($value === NULL) {
@@ -324,21 +324,21 @@
$edit['data'] = $data;
$edit['uid'] = $account->uid;
- // Save changes to the users table.
- $success = drupal_write_record('users', $edit, 'uid');
+ // Save changes to the user table.
+ $success = drupal_write_record('user', $edit, 'uid');
if (!$success) {
// The query failed - better to abort the save than risk further
// data loss.
// TODO: Fields change: I think this is a bug. If no columns in
- // the users table are changed, drupal_write_record returns
+ // the user table are changed, drupal_write_record returns
// FALSE because rowCount() (rows changed) is 0. However,
- // non-users data may have been changed, e.g. fields.
+ // non-user data may have been changed, e.g. fields.
// return FALSE;
}
// If the picture changed or was unset, remove the old one. This step needs
- // to occur after updating the {users} record so that user_file_references()
+ // to occur after updating the {user} record so that user_file_references()
// doesn't report it in use and block the deletion.
if (!empty($account->picture->fid) && ($edit['picture'] != $account->picture->fid)) {
file_delete($account->picture);
@@ -346,11 +346,11 @@
// Reload user roles if provided.
if (isset($edit['roles']) && is_array($edit['roles'])) {
- db_query('DELETE FROM {users_roles} WHERE uid = %d', $account->uid);
+ db_query('DELETE FROM {user_role} WHERE uid = %d', $account->uid);
foreach (array_keys($edit['roles']) as $rid) {
if (!in_array($rid, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) {
- db_query('INSERT INTO {users_roles} (uid, rid) VALUES (%d, %d)', $account->uid, $rid);
+ db_query('INSERT INTO {user_role} (uid, rid) VALUES (%d, %d)', $account->uid, $rid);
}
}
}
@@ -396,7 +396,7 @@
$edit['access'] = REQUEST_TIME;
}
- $success = drupal_write_record('users', $edit);
+ $success = drupal_write_record('user', $edit);
if (!$success) {
// On a failed INSERT some other existing user's uid may be returned.
// We must abort to avoid overwriting their account.
@@ -415,8 +415,8 @@
// fields from being saved there.
$data = array();
foreach ($edit as $key => $value) {
- // Form fields that don't pertain to the users, user_roles, or
- // Field API are automatically serialized into the users.data
+ // Form fields that don't pertain to the user, user_roles, or
+ // Field API are automatically serialized into the user.data
// column.
if (($key != 'roles') && (empty($user_fields[$key]) && empty($field_form[$key])) && ($value !== NULL)) {
$data[$key] = $value;
@@ -424,15 +424,15 @@
}
if (!empty($data)) {
$data_array = array('uid' => $user->uid, 'data' => $data);
- drupal_write_record('users', $data_array, 'uid');
+ drupal_write_record('user', $data_array, 'uid');
}
// Save user roles (delete just to be safe).
if (isset($edit['roles']) && is_array($edit['roles'])) {
- db_query('DELETE FROM {users_roles} WHERE uid = %d', $edit['uid']);
+ db_query('DELETE FROM {user_role} WHERE uid = %d', $edit['uid']);
foreach (array_keys($edit['roles']) as $rid) {
if (!in_array($rid, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) {
- db_query('INSERT INTO {users_roles} (uid, rid) VALUES (%d, %d)', $edit['uid'], $rid);
+ db_query('INSERT INTO {user_role} (uid, rid) VALUES (%d, %d)', $edit['uid'], $rid);
}
}
}
@@ -644,7 +644,7 @@
* @return boolean TRUE for blocked users, FALSE for active.
*/
function user_is_blocked($name) {
- $deny = db_fetch_object(db_query("SELECT name FROM {users} WHERE status = 0 AND name = LOWER('%s')", $name));
+ $deny = db_fetch_object(db_query("SELECT name FROM {user} WHERE status = 0 AND name = LOWER('%s')", $name));
return $deny;
}
@@ -698,7 +698,7 @@
*/
function user_file_references($file) {
// Determine if the file is used by this module.
- $count = db_query('SELECT COUNT(*) FROM {users} WHERE picture = :fid', array(':fid' => $file->fid))->fetchField();
+ $count = db_query('SELECT COUNT(*) FROM {user} WHERE picture = :fid', array(':fid' => $file->fid))->fetchField();
if ($count) {
// Return the name of the module and how many references it has to the file.
return array('user' => $count);
@@ -710,7 +710,7 @@
*/
function user_file_delete($file) {
// Remove any references to the file.
- db_update('users')
+ db_update('user')
->fields(array('picture' => 0))
->condition('picture', $file->fid)
->execute();
@@ -732,13 +732,13 @@
$keys = preg_replace('!\*+!', '%', $keys);
if (user_access('administer users')) {
// Administrators can also search in the otherwise private email field.
- $result = pager_query("SELECT name, uid, mail FROM {users} WHERE LOWER(name) LIKE LOWER('%%%s%%') OR LOWER(mail) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys, $keys);
+ $result = pager_query("SELECT name, uid, mail FROM {user} WHERE LOWER(name) LIKE LOWER('%%%s%%') OR LOWER(mail) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys, $keys);
while ($account = db_fetch_object($result)) {
$find[] = array('title' => $account->name . ' (' . $account->mail . ')', 'link' => url('user/' . $account->uid, array('absolute' => TRUE)));
}
}
else {
- $result = pager_query("SELECT name, uid FROM {users} WHERE LOWER(name) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys);
+ $result = pager_query("SELECT name, uid FROM {user} WHERE LOWER(name) LIKE LOWER('%%%s%%')", 15, 0, NULL, $keys);
while ($account = db_fetch_object($result)) {
$find[] = array('title' => $account->name, 'link' => url('user/' . $account->uid, array('absolute' => TRUE)));
}
@@ -807,7 +807,7 @@
if ($error = user_validate_name($edit['name'])) {
form_set_error('name', $error);
}
- elseif (db_result(db_query("SELECT COUNT(*) FROM {users} WHERE uid != %d AND LOWER(name) = LOWER('%s')", $uid, $edit['name'])) > 0) {
+ elseif (db_result(db_query("SELECT COUNT(*) FROM {user} WHERE uid != %d AND LOWER(name) = LOWER('%s')", $uid, $edit['name'])) > 0) {
form_set_error('name', t('The name %name is already taken.', array('%name' => $edit['name'])));
}
}
@@ -816,7 +816,7 @@
if ($error = user_validate_mail($edit['mail'])) {
form_set_error('mail', $error);
}
- elseif (db_result(db_query("SELECT COUNT(*) FROM {users} WHERE uid != %d AND LOWER(mail) = LOWER('%s')", $uid, $edit['mail'])) > 0) {
+ elseif (db_result(db_query("SELECT COUNT(*) FROM {user} WHERE uid != %d AND LOWER(mail) = LOWER('%s')", $uid, $edit['mail'])) > 0) {
// Format error message dependent on whether the user is logged in or not.
if ($GLOBALS['user']->uid) {
form_set_error('mail', t('The e-mail address %email is already taken.', array('%email' => $edit['mail'])));
@@ -982,7 +982,7 @@
case 'new':
if (user_access('access content')) {
// Retrieve a list of new users who have subsequently accessed the site successfully.
- $items = db_query_range('SELECT uid, name FROM {users} WHERE status != 0 AND access != 0 ORDER BY created DESC', array(), 0, variable_get('user_block_whois_new_count', 5))->fetchAll();
+ $items = db_query_range('SELECT uid, name FROM {user} WHERE status != 0 AND access != 0 ORDER BY created DESC', array(), 0, variable_get('user_block_whois_new_count', 5))->fetchAll();
$output = theme('user_list', $items);
$block['subject'] = t('Who\'s new');
@@ -1018,7 +1018,7 @@
// Display a list of currently online users.
$max_users = variable_get('user_block_max_list_count', 10);
if ($authenticated_count && $max_users) {
- $items = db_query_range('SELECT u.uid, u.name, MAX(s.timestamp) AS max_timestamp FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= :interval AND s.uid > 0 GROUP BY u.uid, u.name ORDER BY max_timestamp DESC', array(':interval' => $interval), 0, $max_users)->fetchAll();
+ $items = db_query_range('SELECT u.uid, u.name, MAX(s.timestamp) AS max_timestamp FROM {user} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= :interval AND s.uid > 0 GROUP BY u.uid, u.name ORDER BY max_timestamp DESC', array(':interval' => $interval), 0, $max_users)->fetchAll();
$output .= theme('user_list', $items, t('Online users'));
}
@@ -1044,7 +1044,7 @@
$account = $variables['account'];
if (!empty($account->picture)) {
// @TODO: Ideally this function would only be passed file objects, but
- // since there's a lot of legacy code that JOINs the {users} table to
+ // since there's a lot of legacy code that JOINs the {user} table to
// {node} or {comments} and passes the results into this function if we
// a numeric value in the picture field we'll assume it's a file id
// and load it for them. Once we've got user_load_multiple() and
@@ -1543,7 +1543,7 @@
$password = trim($form_values['pass']);
// Name and pass keys are required.
if (!empty($form_values['name']) && !empty($password)) {
- $account = db_fetch_object(db_query("SELECT * FROM {users} WHERE name = '%s' AND status = 1", $form_values['name']));
+ $account = db_fetch_object(db_query("SELECT * FROM {user} WHERE name = '%s' AND status = 1", $form_values['name']));
if ($account) {
// Allow alternate password hashing schemes.
require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
@@ -1551,7 +1551,7 @@
if (user_needs_new_hash($account)) {
$new_hash = user_hash_password($password);
if ($new_hash) {
- db_query("UPDATE {users} SET pass = '%s' WHERE uid = %d", $new_hash, $account->uid);
+ db_query("UPDATE {user} SET pass = '%s' WHERE uid = %d", $new_hash, $account->uid);
}
}
$account = user_load(array('uid' => $account->uid, 'status' => 1));
@@ -1578,7 +1578,7 @@
// Update the user table timestamp noting user has logged in.
// This is also used to invalidate one-time login links.
$user->login = REQUEST_TIME;
- db_query("UPDATE {users} SET login = %d WHERE uid = %d", $user->login, $user->uid);
+ db_query("UPDATE {user} SET login = %d WHERE uid = %d", $user->login, $user->uid);
// Regenerate the session ID to prevent against session fixation attacks.
// This is called before hook_user in case one of those functions fails
// or incorrectly does a redirect which would leave the old session in place.
@@ -1849,7 +1849,7 @@
if (!empty($edit['user_cancel_notify'])) {
_user_mail_notify('status_blocked', $account);
}
- db_update('users')->fields(array('status' => 0))->condition('uid', $account->uid)->execute();
+ db_update('user')->fields(array('status' => 0))->condition('uid', $account->uid)->execute();
drupal_set_message(t('%name has been disabled.', array('%name' => $account->name)));
watchdog('user', 'Blocked user: %name %email.', array('%name' => $account->name, '%email' => '<' . $account->mail . '>'), WATCHDOG_NOTICE);
break;
@@ -1860,8 +1860,8 @@
if (!empty($edit['user_cancel_notify'])) {
_user_mail_notify('status_canceled', $account);
}
- db_delete('users')->condition('uid', $account->uid)->execute();
- db_delete('users_roles')->condition('uid', $account->uid)->execute();
+ db_delete('user')->condition('uid', $account->uid)->execute();
+ db_delete('user_role')->condition('uid', $account->uid)->execute();
db_delete('authmap')->condition('uid', $account->uid)->execute();
drupal_set_message(t('%name has been deleted.', array('%name' => $account->name)));
watchdog('user', 'Deleted user: %name %email.', array('%name' => $account->name, '%email' => '<' . $account->mail . '>'), WATCHDOG_NOTICE);
@@ -2169,7 +2169,7 @@
$form['accounts'] = array('#prefix' => '
', '#tree' => TRUE);
// array_filter() returns only elements with TRUE values.
foreach (array_filter($edit['accounts']) as $uid => $value) {
- $user = db_result(db_query('SELECT name FROM {users} WHERE uid = %d', $uid));
+ $user = db_result(db_query('SELECT name FROM {user} WHERE uid = %d', $uid));
$form['accounts'][$uid] = array('#type' => 'hidden', '#value' => $uid, '#prefix' => '', '#suffix' => check_plain($user) . "\n");
}
@@ -2595,7 +2595,7 @@
global $user;
$uid = $user->uid;
}
- db_query("UPDATE {users} SET status = 0 WHERE uid = %d", $uid);
+ db_query("UPDATE {user} SET status = 0 WHERE uid = %d", $uid);
drupal_session_destroy_uid($uid);
watchdog('action', 'Blocked user %name.', array('%name' => $user->name));
}
Index: modules/statistics/statistics.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.install,v
retrieving revision 1.15
diff -u -r1.15 statistics.install
--- modules/statistics/statistics.install 3 Dec 2008 19:22:09 -0000 1.15
+++ modules/statistics/statistics.install 16 Feb 2009 23:19:13 -0000
@@ -91,7 +91,7 @@
'unsigned' => TRUE,
'not null' => FALSE,
'default' => 0,
- 'description' => 'User {users}.uid that visited the page.',
+ 'description' => 'User {user}.uid that visited the page.',
),
'timer' => array(
'type' => 'int',
Index: modules/statistics/statistics.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.admin.inc,v
retrieving revision 1.17
diff -u -r1.17 statistics.admin.inc
--- modules/statistics/statistics.admin.inc 22 Jan 2009 12:01:24 -0000 1.17
+++ modules/statistics/statistics.admin.inc 16 Feb 2009 23:19:13 -0000
@@ -17,7 +17,7 @@
array('data' => t('Operations'))
);
- $sql = 'SELECT a.aid, a.path, a.title, a.uid, u.name, a.timestamp FROM {accesslog} a LEFT JOIN {users} u ON u.uid = a.uid' . tablesort_sql($header);
+ $sql = 'SELECT a.aid, a.path, a.title, a.uid, u.name, a.timestamp FROM {accesslog} a LEFT JOIN {user} u ON u.uid = a.uid' . tablesort_sql($header);
$result = pager_query($sql, 30);
$rows = array();
@@ -82,7 +82,7 @@
array('data' => user_access('block IP addresses') ? t('Operations') : '', 'colspan' => 2),
);
- $sql = "SELECT COUNT(a.uid) AS hits, a.uid, u.name, a.hostname, SUM(a.timer) AS total, bl.iid FROM {accesslog} a LEFT JOIN {blocked_ips} bl ON a.hostname = bl.ip LEFT JOIN {users} u ON a.uid = u.uid GROUP BY a.hostname, a.uid, u.name, bl.iid" . tablesort_sql($header);
+ $sql = "SELECT COUNT(a.uid) AS hits, a.uid, u.name, a.hostname, SUM(a.timer) AS total, bl.iid FROM {accesslog} a LEFT JOIN {blocked_ips} bl ON a.hostname = bl.ip LEFT JOIN {user} u ON a.uid = u.uid GROUP BY a.hostname, a.uid, u.name, bl.iid" . tablesort_sql($header);
$sql_cnt = "SELECT COUNT(DISTINCT(CONCAT(CAST(uid AS char), hostname))) FROM {accesslog}";
$result = pager_query($sql, 30, 0, $sql_cnt);
@@ -138,7 +138,7 @@
* Menu callback; Displays recent page accesses.
*/
function statistics_access_log($aid) {
- $result = db_query('SELECT a.*, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE aid = %d', $aid);
+ $result = db_query('SELECT a.*, u.name FROM {accesslog} a LEFT JOIN {user} u ON a.uid = u.uid WHERE aid = %d', $aid);
if ($access = db_fetch_object($result)) {
$rows[] = array(
array('data' => t('URL'), 'header' => TRUE),
Index: modules/statistics/statistics.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.pages.inc,v
retrieving revision 1.6
diff -u -r1.6 statistics.pages.inc
--- modules/statistics/statistics.pages.inc 13 Oct 2008 00:33:04 -0000 1.6
+++ modules/statistics/statistics.pages.inc 16 Feb 2009 23:19:13 -0000
@@ -15,7 +15,7 @@
array('data' => t('User'), 'field' => 'u.name'),
array('data' => t('Operations')));
- $result = pager_query('SELECT a.aid, a.timestamp, a.url, a.uid, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE a.path LIKE \'node/%d%%\'' . tablesort_sql($header), 30, 0, NULL, $node->nid);
+ $result = pager_query('SELECT a.aid, a.timestamp, a.url, a.uid, u.name FROM {accesslog} a LEFT JOIN {user} u ON a.uid = u.uid WHERE a.path LIKE \'node/%d%%\'' . tablesort_sql($header), 30, 0, NULL, $node->nid);
$rows = array();
while ($log = db_fetch_object($result)) {
$rows[] = array(
Index: modules/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.296
diff -u -r1.296 statistics.module
--- modules/statistics/statistics.module 26 Jan 2009 14:08:43 -0000 1.296
+++ modules/statistics/statistics.module 16 Feb 2009 23:19:13 -0000
@@ -232,7 +232,7 @@
*/
function statistics_title_list($dbfield, $dbrows) {
if (in_array($dbfield, array('totalcount', 'daycount', 'timestamp'))) {
- return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE s." . $dbfield . " != 0 AND n.status = 1 ORDER BY s." . $dbfield . " DESC"), 0, $dbrows);
+ return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {user} u ON n.uid = u.uid WHERE s." . $dbfield . " != 0 AND n.status = 1 ORDER BY s." . $dbfield . " DESC"), 0, $dbrows);
}
return FALSE;
}
Index: modules/blogapi/blogapi.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/blogapi/blogapi.install,v
retrieving revision 1.4
diff -u -r1.4 blogapi.install
--- modules/blogapi/blogapi.install 15 Nov 2008 13:01:04 -0000 1.4
+++ modules/blogapi/blogapi.install 16 Feb 2009 23:19:09 -0000
@@ -30,7 +30,7 @@
'type' => 'serial',
),
'uid' => array(
- 'description' => 'The {users}.uid of the user who is associated with the file.',
+ 'description' => 'The {user}.uid of the user who is associated with the file.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
Index: modules/blogapi/blogapi.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blogapi/blogapi.module,v
retrieving revision 1.142
diff -u -r1.142 blogapi.module
--- modules/blogapi/blogapi.module 21 Jan 2009 16:58:41 -0000 1.142
+++ modules/blogapi/blogapi.module 16 Feb 2009 23:19:09 -0000
@@ -379,13 +379,13 @@
}
if ($bodies) {
- $result = db_query_range("SELECT n.nid, n.title, r.body, r.format, n.comment, n.created, u.name FROM {node} n, {node_revision} r, {users} u WHERE n.uid = u.uid AND n.vid = r.vid AND n.type = :type AND n.uid = :uid ORDER BY n.created DESC", array(
+ $result = db_query_range("SELECT n.nid, n.title, r.body, r.format, n.comment, n.created, u.name FROM {node} n, {node_revision} r, {user} u WHERE n.uid = u.uid AND n.vid = r.vid AND n.type = :type AND n.uid = :uid ORDER BY n.created DESC", array(
':type' => $blogid,
':uid' => $user->uid
), 0, $number_of_posts);
}
else {
- $result = db_query_range("SELECT n.nid, n.title, n.created, u.name FROM {node} n, {users} u WHERE n.uid = u.uid AND n.type = :type AND n.uid = :uid ORDER BY n.created DESC", array(
+ $result = db_query_range("SELECT n.nid, n.title, n.created, u.name FROM {node} n, {user} u WHERE n.uid = u.uid AND n.type = :type AND n.uid = :uid ORDER BY n.created DESC", array(
':type' => $blogid,
':uid' => $user->uid
), 0, $number_of_posts);
Index: sites/default/default.settings.php
===================================================================
RCS file: /cvs/drupal/drupal/sites/default/default.settings.php,v
retrieving revision 1.18
diff -u -r1.18 default.settings.php
--- sites/default/default.settings.php 23 Dec 2008 19:59:17 -0000 1.18
+++ sites/default/default.settings.php 16 Feb 2009 23:19:18 -0000
@@ -124,7 +124,7 @@
*
* $db_prefix = array(
* 'default' => 'main_',
- * 'users' => 'shared_',
+ * 'user' => 'shared_',
* 'sessions' => 'shared_',
* 'role' => 'shared_',
* 'authmap' => 'shared_',
Index: modules/dblog/dblog.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.admin.inc,v
retrieving revision 1.11
diff -u -r1.11 dblog.admin.inc
--- modules/dblog/dblog.admin.inc 19 Jan 2009 10:46:51 -0000 1.11
+++ modules/dblog/dblog.admin.inc 16 Feb 2009 23:19:10 -0000
@@ -63,7 +63,7 @@
array('data' => t('Operations')),
);
- $sql = "SELECT w.wid, w.uid, w.severity, w.type, w.timestamp, w.message, w.variables, w.link, u.name FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid";
+ $sql = "SELECT w.wid, w.uid, w.severity, w.type, w.timestamp, w.message, w.variables, w.link, u.name FROM {watchdog} w INNER JOIN {user} u ON w.uid = u.uid";
$tablesort = tablesort_sql($header);
if (!empty($filter['where'])) {
$result = pager_query($sql . " WHERE " . $filter['where'] . $tablesort, 50, 0, NULL, $filter['args']);
@@ -132,7 +132,7 @@
function dblog_event($id) {
$severity = watchdog_severity_levels();
$output = '';
- $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = %d', $id);
+ $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {user} u ON w.uid = u.uid WHERE w.wid = %d', $id);
if ($dblog = db_fetch_object($result)) {
$rows = array(
array(
Index: modules/dblog/dblog.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/dblog/dblog.install,v
retrieving revision 1.12
diff -u -r1.12 dblog.install
--- modules/dblog/dblog.install 28 Dec 2008 20:41:19 -0000 1.12
+++ modules/dblog/dblog.install 16 Feb 2009 23:19:10 -0000
@@ -33,7 +33,7 @@
'type' => 'int',
'not null' => TRUE,
'default' => 0,
- 'description' => 'The {users}.uid of the user who triggered the event.',
+ 'description' => 'The {user}.uid of the user who triggered the event.',
),
'type' => array(
'type' => 'varchar',
Index: modules/tracker/tracker.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.pages.inc,v
retrieving revision 1.14
diff -u -r1.14 tracker.pages.inc
--- modules/tracker/tracker.pages.inc 30 Dec 2008 16:43:19 -0000 1.14
+++ modules/tracker/tracker.pages.inc 16 Feb 2009 23:19:16 -0000
@@ -22,14 +22,14 @@
drupal_set_title($account->name);
}
// TODO: These queries are very expensive, see http://drupal.org/node/105639
- $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {users} u ON n.uid = u.uid LEFT JOIN {comment} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d) ORDER BY last_updated DESC';
+ $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {user} u ON n.uid = u.uid LEFT JOIN {comment} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d) ORDER BY last_updated DESC';
$sql = db_rewrite_sql($sql);
$sql_count = 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n LEFT JOIN {comment} c ON n.nid = c.nid AND (c.status = %d OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d)';
$sql_count = db_rewrite_sql($sql_count);
$result = pager_query($sql, 25, 0, $sql_count, COMMENT_PUBLISHED, $account->uid, $account->uid);
}
else {
- $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 ORDER BY last_updated DESC';
+ $sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) AS last_updated, l.comment_count FROM {node} n INNER JOIN {user} u ON n.uid = u.uid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 ORDER BY last_updated DESC';
$sql = db_rewrite_sql($sql);
$sql_count = 'SELECT COUNT(n.nid) FROM {node} n WHERE n.status = 1';
$sql_count = db_rewrite_sql($sql_count);
Index: scripts/password-hash.sh
===================================================================
RCS file: /cvs/drupal/drupal/scripts/password-hash.sh,v
retrieving revision 1.4
diff -u -r1.4 password-hash.sh
--- scripts/password-hash.sh 13 Jan 2009 22:39:11 -0000 1.4
+++ scripts/password-hash.sh 16 Feb 2009 23:19:18 -0000
@@ -52,7 +52,7 @@
"" ["" ["" ...]]
One or more plan-text passwords enclosed by double quotes. The
- output hash may be manually entered into the {users}.pass field to
+ output hash may be manually entered into the {user}.pass field to
change a password via SQL to a known value.
To run this script without the --root argument invoke it from the root directory
Index: modules/simpletest/tests/database_test.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/database_test.test,v
retrieving revision 1.39
diff -u -r1.39 database_test.test
--- modules/simpletest/tests/database_test.test 25 Jan 2009 12:19:32 -0000 1.39
+++ modules/simpletest/tests/database_test.test 16 Feb 2009 23:19:13 -0000
@@ -1956,10 +1956,10 @@
// Now try to run two db_query_temporary() in the same request.
$table_name_system = db_query_temporary('SELECT status FROM {system}', array());
- $table_name_users = db_query_temporary('SELECT uid FROM {users}', array());
+ $table_name_users = db_query_temporary('SELECT uid FROM {user}', array());
$this->assertEqual($this->countTableRows($table_name_system), $this->countTableRows("system"), t('A temporary table was created successfully in this request.'));
- $this->assertEqual($this->countTableRows($table_name_users), $this->countTableRows("users"), t('A second temporary table was created successfully in this request.'));
+ $this->assertEqual($this->countTableRows($table_name_users), $this->countTableRows("user"), t('A second temporary table was created successfully in this request.'));
}
}
Index: modules/poll/poll.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.install,v
retrieving revision 1.18
diff -u -r1.18 poll.install
--- modules/poll/poll.install 21 Jan 2009 14:42:16 -0000 1.18
+++ modules/poll/poll.install 16 Feb 2009 23:19:12 -0000
@@ -92,13 +92,13 @@
);
$schema['poll_vote'] = array(
- 'description' => 'Stores per-{users} votes for each {poll}.',
+ 'description' => 'Stores per-{user} votes for each {poll}.',
'fields' => array(
'chid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
- 'description' => "The {users}'s vote for this poll.",
+ 'description' => "The {user}'s vote for this poll.",
),
'nid' => array(
'type' => 'int',
@@ -111,7 +111,7 @@
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
- 'description' => 'The {users}.uid this vote is from unless the voter was anonymous.',
+ 'description' => 'The {user}.uid this vote is from unless the voter was anonymous.',
),
'hostname' => array(
'type' => 'varchar',
Index: modules/poll/poll.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.pages.inc,v
retrieving revision 1.12
diff -u -r1.12 poll.pages.inc
--- modules/poll/poll.pages.inc 21 Jan 2009 14:42:16 -0000 1.12
+++ modules/poll/poll.pages.inc 16 Feb 2009 23:19:12 -0000
@@ -35,7 +35,7 @@
$header[] = array('data' => t('Vote'), 'field' => 'pc.chtext');
$header[] = array('data' => t('Timestamp'), 'field' => 'pv.timestamp', 'sort' => 'desc');
- $result = pager_query("SELECT pv.chid, pv.uid, pv.hostname, pv.timestamp, pv.nid, pc.chtext, u.name FROM {poll_vote} pv INNER JOIN {poll_choice} pc ON pv.chid = pc.chid LEFT JOIN {users} u ON pv.uid = u.uid WHERE pv.nid = %d". tablesort_sql($header), 20, 0, NULL, $node->nid);
+ $result = pager_query("SELECT pv.chid, pv.uid, pv.hostname, pv.timestamp, pv.nid, pc.chtext, u.name FROM {poll_vote} pv INNER JOIN {poll_choice} pc ON pv.chid = pc.chid LEFT JOIN {user} u ON pv.uid = u.uid WHERE pv.nid = %d". tablesort_sql($header), 20, 0, NULL, $node->nid);
$rows = array();
while ($vote = db_fetch_object($result)) {
$rows[] = array(
Index: modules/profile/profile.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.pages.inc,v
retrieving revision 1.10
diff -u -r1.10 profile.pages.inc
--- modules/profile/profile.pages.inc 5 Dec 2008 12:50:28 -0000 1.10
+++ modules/profile/profile.pages.inc 16 Feb 2009 23:19:12 -0000
@@ -55,7 +55,7 @@
}
// Extract the affected users:
- $result = pager_query("SELECT u.uid, u.access FROM {users} u INNER JOIN {profile_value} v ON u.uid = v.uid WHERE v.fid = %d AND $query AND u.access != 0 AND u.status != 0 ORDER BY u.access DESC", 20, 0, NULL, $arguments);
+ $result = pager_query("SELECT u.uid, u.access FROM {user} u INNER JOIN {profile_value} v ON u.uid = v.uid WHERE v.fid = %d AND $query AND u.access != 0 AND u.status != 0 ORDER BY u.access DESC", 20, 0, NULL, $arguments);
$content = '';
while ($account = db_fetch_object($result)) {
@@ -88,7 +88,7 @@
}
// Extract the affected users:
- $result = pager_query('SELECT uid, access FROM {users} WHERE uid > 0 AND status != 0 AND access != 0 ORDER BY access DESC', 20, 0, NULL);
+ $result = pager_query('SELECT uid, access FROM {user} WHERE uid > 0 AND status != 0 AND access != 0 ORDER BY access DESC', 20, 0, NULL);
$content = '';
while ($account = db_fetch_object($result)) {
Index: modules/profile/profile.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.admin.inc,v
retrieving revision 1.21
diff -u -r1.21 profile.admin.inc
--- modules/profile/profile.admin.inc 3 Feb 2009 18:55:31 -0000 1.21
+++ modules/profile/profile.admin.inc 16 Feb 2009 23:19:12 -0000
@@ -294,7 +294,7 @@
form_set_error('name', t('The specified form name contains one or more illegal characters. Spaces or any other special characters except dash (-) and underscore (_) are not allowed.'));
}
- $users_table = drupal_get_schema('users');
+ $users_table = drupal_get_schema('user');
if (!empty($users_table['fields'][$form_state['values']['name']])) {
form_set_error('name', t('The specified form name is reserved for use by Drupal.'));
}
Index: modules/profile/profile.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/profile/profile.install,v
retrieving revision 1.15
diff -u -r1.15 profile.install
--- modules/profile/profile.install 5 Dec 2008 12:50:28 -0000 1.15
+++ modules/profile/profile.install 16 Feb 2009 23:19:12 -0000
@@ -132,7 +132,7 @@
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
- 'description' => 'The {users}.uid of the profile user.',
+ 'description' => 'The {user}.uid of the profile user.',
),
'value' => array(
'type' => 'text',
Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.485
diff -u -r1.485 forum.module
--- modules/forum/forum.module 14 Jan 2009 21:16:20 -0000 1.485
+++ modules/forum/forum.module 16 Feb 2009 23:19:11 -0000
@@ -613,7 +613,7 @@
// This query does not use full ANSI syntax since MySQL 3.x does not support
// table1 INNER JOIN table2 INNER JOIN table3 ON table2_criteria ON table3_criteria
// used to join node_comment_statistics to users.
- $sql = "SELECT ncs.last_comment_timestamp, IF (ncs.last_comment_uid != 0, u2.name, ncs.last_comment_name) AS last_comment_name, ncs.last_comment_uid FROM {node} n INNER JOIN {users} u1 ON n.uid = u1.uid INNER JOIN {taxonomy_term_node} tn ON n.vid = tn.vid INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid INNER JOIN {users} u2 ON ncs.last_comment_uid=u2.uid WHERE n.status = 1 AND tn.tid = %d ORDER BY ncs.last_comment_timestamp DESC";
+ $sql = "SELECT ncs.last_comment_timestamp, IF (ncs.last_comment_uid != 0, u2.name, ncs.last_comment_name) AS last_comment_name, ncs.last_comment_uid FROM {node} n INNER JOIN {user} u1 ON n.uid = u1.uid INNER JOIN {taxonomy_term_node} tn ON n.vid = tn.vid INNER JOIN {node_comment_statistics} ncs ON n.nid = ncs.nid INNER JOIN {user} u2 ON ncs.last_comment_uid=u2.uid WHERE n.status = 1 AND tn.tid = %d ORDER BY ncs.last_comment_timestamp DESC";
$sql = db_rewrite_sql($sql);
$topic = db_fetch_object(db_query_range($sql, $forum->tid, 0, 1));
@@ -659,7 +659,7 @@
}
}
- $sql = db_rewrite_sql("SELECT n.nid, r.tid, n.title, n.type, n.sticky, u.name, u.uid, n.created AS timestamp, n.comment AS comment_mode, l.last_comment_timestamp, IF(l.last_comment_uid != 0, cu.name, l.last_comment_name) AS last_comment_name, l.last_comment_uid, l.comment_count AS num_comments, f.tid AS forum_tid FROM {node_comment_statistics} l INNER JOIN {node} n ON n.nid = l.nid INNER JOIN {users} cu ON l.last_comment_uid = cu.uid INNER JOIN {taxonomy_term_node} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {forum} f ON n.vid = f.vid WHERE n.status = 1 AND r.tid = %d");
+ $sql = db_rewrite_sql("SELECT n.nid, r.tid, n.title, n.type, n.sticky, u.name, u.uid, n.created AS timestamp, n.comment AS comment_mode, l.last_comment_timestamp, IF(l.last_comment_uid != 0, cu.name, l.last_comment_name) AS last_comment_name, l.last_comment_uid, l.comment_count AS num_comments, f.tid AS forum_tid FROM {node_comment_statistics} l INNER JOIN {node} n ON n.nid = l.nid INNER JOIN {user} cu ON l.last_comment_uid = cu.uid INNER JOIN {taxonomy_term_node} r ON n.vid = r.vid INNER JOIN {user} u ON n.uid = u.uid INNER JOIN {forum} f ON n.vid = f.vid WHERE n.status = 1 AND r.tid = %d");
$sql .= tablesort_sql($forum_topic_list_header, 'n.sticky DESC,');
$sql .= ', n.created DESC'; // Always add a secondary sort order so that the news forum topics are on top.
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.38
diff -u -r1.38 node.admin.inc
--- modules/node/node.admin.inc 3 Feb 2009 18:55:30 -0000 1.38
+++ modules/node/node.admin.inc 16 Feb 2009 23:19:11 -0000
@@ -483,7 +483,7 @@
$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(
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1024
diff -u -r1.1024 node.module
--- modules/node/node.module 13 Feb 2009 02:27:59 -0000 1.1024
+++ modules/node/node.module 16 Feb 2009 23:19:12 -0000
@@ -855,7 +855,7 @@
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 @@
$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_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_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_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_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);
}
Index: modules/node/node.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.install,v
retrieving revision 1.11
diff -u -r1.11 node.install
--- modules/node/node.install 21 Jan 2009 16:58:42 -0000 1.11
+++ modules/node/node.install 16 Feb 2009 23:19:11 -0000
@@ -43,7 +43,7 @@
'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 @@
'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,
Index: modules/block/block.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.install,v
retrieving revision 1.18
diff -u -r1.18 block.install
--- modules/block/block.install 3 Feb 2009 12:30:14 -0000 1.18
+++ modules/block/block.install 16 Feb 2009 23:19:09 -0000
@@ -117,7 +117,7 @@
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
- 'description' => "The user's role ID from {users_roles}.rid.",
+ 'description' => "The user's role ID from {user_role}.rid.",
),
),
'primary key' => array('module', 'delta', 'rid'),
Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.157
diff -u -r1.157 file.inc
--- includes/file.inc 13 Feb 2009 00:39:01 -0000 1.157
+++ includes/file.inc 16 Feb 2009 23:19:09 -0000
@@ -13,7 +13,7 @@
*
* Fields on the file object:
* - fid - File ID
- * - uid - The {users}.uid of the user who is associated with the file.
+ * - uid - The {user}.uid of the user who is associated with the file.
* - filename - Name of the file with no path components. This may differ from
* the basename of the filepath if the file is renamed to avoid overwriting
* an existing file.
Index: includes/password.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/password.inc,v
retrieving revision 1.4
diff -u -r1.4 password.inc
--- includes/password.inc 20 Dec 2008 18:24:33 -0000 1.4
+++ includes/password.inc 16 Feb 2009 23:19:09 -0000
@@ -195,7 +195,7 @@
* @param $password
* A plain-text password
* @param $account
- * A user object with at least the fields from the {users} table.
+ * A user object with at least the fields from the {user} table.
*
* @return
* TRUE or FALSE.
@@ -227,7 +227,7 @@
* on the fields in $account.
*
* @param $account
- * A user object with at least the fields from the {users} table.
+ * A user object with at least the fields from the {user} table.
*
* @return
* TRUE or FALSE.
Index: includes/session.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/session.inc,v
retrieving revision 1.65
diff -u -r1.65 session.inc
--- includes/session.inc 19 Jan 2009 10:46:50 -0000 1.65
+++ includes/session.inc 16 Feb 2009 23:19:09 -0000
@@ -83,7 +83,7 @@
// Otherwise, if the session is still active, we have a record of the
// client's session in the database.
- $user = db_query("SELECT u.*, s.* FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.sid = :sid", array(':sid' => $key))->fetchObject();
+ $user = db_query("SELECT u.*, s.* FROM {user} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.sid = :sid", array(':sid' => $key))->fetchObject();
// We found the client's session record and they are an authenticated user.
if ($user && $user->uid > 0) {
@@ -93,7 +93,7 @@
// Add roles element to $user.
$user->roles = array();
$user->roles[DRUPAL_AUTHENTICATED_RID] = 'authenticated user';
- $user->roles += db_query("SELECT r.rid, r.name FROM {role} r INNER JOIN {users_roles} ur ON ur.rid = r.rid WHERE ur.uid = :uid", array(':uid' => $user->uid))->fetchAllKeyed(0, 1);
+ $user->roles += db_query("SELECT r.rid, r.name FROM {role} r INNER JOIN {user_role} ur ON ur.rid = r.rid WHERE ur.uid = :uid", array(':uid' => $user->uid))->fetchAllKeyed(0, 1);
}
// We didn't find the client's record (session has expired), or they
// are an anonymous user.
@@ -146,7 +146,7 @@
// Last access time is updated no more frequently than once every 180 seconds.
// This reduces contention in the users table.
if ($user->uid && REQUEST_TIME - $user->access > variable_get('session_write_interval', 180)) {
- db_update('users')
+ db_update('user')
->fields(array(
'access' => REQUEST_TIME
))
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.125
diff -u -r1.125 system.admin.inc
--- modules/system/system.admin.inc 11 Feb 2009 05:33:18 -0000 1.125
+++ modules/system/system.admin.inc 16 Feb 2009 23:19:14 -0000
@@ -1784,7 +1784,7 @@
}
// MySQL import might have set the uid of the anonymous user to autoincrement
// value. Let's try fixing it. See http://drupal.org/node/204411
- db_query("UPDATE {users} SET uid = uid - uid WHERE name = '' AND pass = '' AND status = 0");
+ db_query("UPDATE {user} SET uid = uid - uid WHERE name = '' AND pass = '' AND status = 0");
return theme('status_report', $requirements);
}
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.306
diff -u -r1.306 system.install
--- modules/system/system.install 3 Feb 2009 12:30:14 -0000 1.306
+++ modules/system/system.install 16 Feb 2009 23:19:16 -0000
@@ -342,17 +342,17 @@
// uid 2 which is not what we want. So we insert the first user here, the
// anonymous user. uid is 1 here for now, but very soon it will be changed
// to 0.
- db_query("INSERT INTO {users} (name, mail) VALUES('%s', '%s')", '', '');
+ db_query("INSERT INTO {user} (name, mail) VALUES('%s', '%s')", '', '');
// We need some placeholders here as name and mail are uniques and data is
// presumed to be a serialized array. Install will change uid 1 immediately
// anyways. So we insert the superuser here, the uid is 2 here for now, but
// very soon it will be changed to 1.
- db_query("INSERT INTO {users} (name, mail, created, status, data) VALUES('%s', '%s', %d, %d, '%s')", 'placeholder-for-uid-1', 'placeholder-for-uid-1', REQUEST_TIME, 1, serialize(array()));
+ db_query("INSERT INTO {user} (name, mail, created, status, data) VALUES('%s', '%s', %d, %d, '%s')", 'placeholder-for-uid-1', 'placeholder-for-uid-1', REQUEST_TIME, 1, serialize(array()));
// This sets the above two users uid 0 (anonymous). We avoid an explicit 0
// otherwise MySQL might insert the next auto_increment value.
- db_query("UPDATE {users} SET uid = uid - uid WHERE name = '%s'", '');
+ db_query("UPDATE {user} SET uid = uid - uid WHERE name = '%s'", '');
// This sets uid 1 (superuser). We skip uid 2 but that's not a big problem.
- db_query("UPDATE {users} SET uid = 1 WHERE name = '%s'", 'placeholder-for-uid-1');
+ db_query("UPDATE {user} SET uid = 1 WHERE name = '%s'", 'placeholder-for-uid-1');
// Built-in roles.
db_query("INSERT INTO {role} (name) VALUES ('%s')", 'anonymous user');
@@ -608,7 +608,7 @@
'not null' => TRUE,
),
'uid' => array(
- 'description' => 'The {users}.uid of the user who is associated with the file.',
+ 'description' => 'The {user}.uid of the user who is associated with the file.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
@@ -700,10 +700,10 @@
);
$schema['history'] = array(
- 'description' => 'A record of which {users} have read which {node}s.',
+ 'description' => 'A record of which {user} have read which {node}s.',
'fields' => array(
'uid' => array(
- 'description' => 'The {users}.uid that read the {node} nid.',
+ 'description' => 'The {user}.uid that read the {node} nid.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
@@ -1114,7 +1114,7 @@
'description' => "Drupal's session handlers read and write into the sessions table. Each record represents a user session, either anonymous or authenticated.",
'fields' => array(
'uid' => array(
- 'description' => 'The {users}.uid corresponding to a session, or 0 for anonymous user.',
+ 'description' => 'The {user}.uid corresponding to a session, or 0 for anonymous user.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
@@ -1771,11 +1771,11 @@
db_change_field($ret, 'cache_form', 'serialized', 'serialized', array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0));
// Remove default => 0, set auto increment.
- $new_uid = 1 + db_result(db_query('SELECT MAX(uid) FROM {users}'));
- $ret[] = update_sql('UPDATE {users} SET uid = ' . $new_uid . ' WHERE uid = 0');
- db_drop_primary_key($ret, 'users');
- db_change_field($ret, 'users', 'uid', 'uid', array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array('uid')));
- $ret[] = update_sql('UPDATE {users} SET uid = 0 WHERE uid = ' . $new_uid);
+ $new_uid = 1 + db_result(db_query('SELECT MAX(uid) FROM {user}'));
+ $ret[] = update_sql('UPDATE {user} SET uid = ' . $new_uid . ' WHERE uid = 0');
+ db_drop_primary_key($ret, 'user');
+ db_change_field($ret, 'user', 'uid', 'uid', array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), array('primary key' => array('uid')));
+ $ret[] = update_sql('UPDATE {user} SET uid = 0 WHERE uid = ' . $new_uid);
// Special field names.
$map = array('node_revisions' => 'vid');
@@ -2520,8 +2520,8 @@
db_drop_index($ret, 'node', 'status');
db_drop_unique_key($ret, 'node', 'nid_vid');
// Improve user module indices.
- db_add_index($ret, 'users', 'mail', array('mail'));
- db_add_index($ret, 'users_roles', 'rid', array('rid'));
+ db_add_index($ret, 'user', 'mail', array('mail'));
+ db_add_index($ret, 'user_role', 'rid', array('rid'));
// Optional modules - need to check if the tables exist.
// Alter aggregator module's tables primary keys to make them more useful.
@@ -2609,8 +2609,8 @@
}
// User module indices.
- db_drop_unique_key($ret, 'users', 'mail');
- db_add_index($ret, 'users', 'mail', array('mail'));
+ db_drop_unique_key($ret, 'user', 'mail');
+ db_add_index($ret, 'user', 'mail', array('mail'));
// Optional modules - need to check if the tables exist.
// Alter taxonomy module's tables.
@@ -2863,11 +2863,11 @@
// Initialize batch update information.
$sandbox['progress'] = 0;
$sandbox['last_user_processed'] = -1;
- $sandbox['max'] = db_result(db_query("SELECT COUNT(*) FROM {users} WHERE data IS NOT NULL"));
+ $sandbox['max'] = db_result(db_query("SELECT COUNT(*) FROM {user} WHERE data IS NOT NULL"));
}
// Now do the batch update of the user-specific block visibility settings.
$limit = 100;
- $result = db_query_range("SELECT uid, data FROM {users} WHERE uid > %d AND data IS NOT NULL", $sandbox['last_user_processed'], 0, $limit);
+ $result = db_query_range("SELECT uid, data FROM {user} WHERE uid > %d AND data IS NOT NULL", $sandbox['last_user_processed'], 0, $limit);
while ($row = db_fetch_object($result)) {
$data = unserialize($row->data);
$user_needs_update = FALSE;
@@ -2884,7 +2884,7 @@
}
// Update the current user.
if ($user_needs_update) {
- db_query("UPDATE {users} SET data = '%s' WHERE uid = %d", serialize($data), $row->uid);
+ db_query("UPDATE {user} SET data = '%s' WHERE uid = %d", serialize($data), $row->uid);
}
// Update our progress information for the batch update.
$sandbox['progress']++;
Index: modules/system/system.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.api.php,v
retrieving revision 1.18
diff -u -r1.18 system.api.php
--- modules/system/system.api.php 9 Feb 2009 15:42:52 -0000 1.18
+++ modules/system/system.api.php 16 Feb 2009 23:19:15 -0000
@@ -1423,7 +1423,7 @@
*/
function hook_schema_alter(&$schema) {
// Add field to existing schema.
- $schema['users']['fields']['timezone_id'] = array(
+ $schema['user']['fields']['timezone_id'] = array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,