summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-07-31 16:25:04 +0000
committerDries Buytaert <dries@buytaert.net>2004-07-31 16:25:04 +0000
commit64dae93af702d2dffc19bdf161fd232e24362ac3 (patch)
treea3c215af8fffb69a2fe28ffd9f507bf580aa682a
parentf97c3367b0c3aef32122f298f2ce971bb59091c9 (diff)
downloadbrdo-64dae93af702d2dffc19bdf161fd232e24362ac3.tar.gz
brdo-64dae93af702d2dffc19bdf161fd232e24362ac3.tar.bz2
- Patch #9654 by Bart: since the $category paramater was added to user_save,
update 80 (moving the profile fields to their own tables) no longer works.
-rw-r--r--database/updates.inc18
1 files changed, 9 insertions, 9 deletions
diff --git a/database/updates.inc b/database/updates.inc
index 501f7cd15..4b14a2510 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -921,7 +921,7 @@ function update_80() {
db_query("ALTER TABLE {users} ALTER COLUMN picture SET DEFAULT ''");
}
- $result = db_query("SELECT uid FROM {users}");
+ $result = db_query("SELECT uid FROM {users} WHERE uid > 0");
while ($account = db_fetch_object($result)) {
// Load the user record:
$account = user_load(array('uid' => $account->uid));
@@ -929,12 +929,12 @@ function update_80() {
// Modify the user record:
foreach ($fields as $field) {
- $old = "profile_". $field[1];
- $new = $field[1];
- if ($account->$old) {
- $edit[$new] = $account->$old;
- }
- unset($account->$old);
+ $old = "profile_". $field[1];
+ $new = $field[1];
+ if ($account->$old) {
+ $edit[$new] = $account->$old;
+ }
+ unset($account->$old);
}
// Gender specific changes:
@@ -943,12 +943,12 @@ function update_80() {
// Avatar specific changes:
if ($account->profile_avatar) {
- $edit['picture'] = $account->profile_avatar;
+ $edit['picture'] = $account->profile_avatar;
}
unset($account->profile_avatar);
// Save the update record:
- user_save($account, $edit);
+ user_save($account, $edit, 'Personal information');
}
return $ret;