diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-09 22:07:57 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-09 22:07:57 +0000 |
commit | a895a366c56fc3a03303e5341e222b7ad097952b (patch) | |
tree | bc2570500c04151ad8f6ea2b99e385f9839bf2ef /modules/user/user.install | |
parent | 20bac50d4a67dc44b2a40f03162a4d0d244448ce (diff) | |
download | brdo-a895a366c56fc3a03303e5341e222b7ad097952b.tar.gz brdo-a895a366c56fc3a03303e5341e222b7ad097952b.tar.bz2 |
#563106 by quicksketch, scor, andypost, ctmattice1, catch, yched, adrian: Fix critical upgrade path bugs from Drupal 6 to Drupal 7
Diffstat (limited to 'modules/user/user.install')
-rw-r--r-- | modules/user/user.install | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/user/user.install b/modules/user/user.install index 1f57dac91..76c376c86 100644 --- a/modules/user/user.install +++ b/modules/user/user.install @@ -427,13 +427,13 @@ function user_update_7004(&$sandbox) { // Initialize batch update information. $sandbox['progress'] = 0; $sandbox['last_user_processed'] = -1; - $sandbox['max'] = db_query("SELECT COUNT(*) FROM {user} WHERE picture <> ''")->fetchField(); + $sandbox['max'] = db_query("SELECT COUNT(*) FROM {users} WHERE picture <> ''")->fetchField(); } // As a batch operation move the photos into the {file} table and update the // {users} records. $limit = 500; - $result = db_query_range("SELECT uid, picture FROM {user} WHERE picture <> '' AND uid > :uid ORDER BY uid", 0, $limit, array(':uid' => $sandbox['last_user_processed'])); + $result = db_query_range("SELECT uid, picture FROM {users} WHERE picture <> '' AND uid > :uid ORDER BY uid", 0, $limit, array(':uid' => $sandbox['last_user_processed'])); foreach ($result as $user) { // Don't bother adding files that don't exist. if (!file_exists($user->picture)) { @@ -473,8 +473,8 @@ function user_update_7004(&$sandbox) { // When we're finished, drop the old picture field and rename the new one to // replace it. if (isset($sandbox['#finished']) && $sandbox['#finished'] == 1) { - db_drop_field('user', 'picture'); - db_change_field('user', 'picture_fid', 'picture', $picture_field); + db_drop_field('users', 'picture'); + db_change_field('users', 'picture_fid', 'picture', $picture_field); } } |