From 6f02738cc2ca88d01d541b9b81cc7cf860980c33 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 16 May 2001 20:54:37 +0000 Subject: - Removed the "history"-field from the SQL table "users" and added this information to the "users"-field in both nodes and comments. This database/table change reduces the number of SQL queries and makes Drupal scale better where a lot of voting/moderation takes place. Last but not least it can be considered a new and better foundation for future moderation metrics / algorithms. In other words: it is plain better. --> oops, all voting/moderation results will be lost! --> requires database update, see "2.00-to-x.xx.sql"! - Updated database/database.mysql --- modules/account.module | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/account.module') diff --git a/modules/account.module b/modules/account.module index 5f77c995b..28faf1fe3 100644 --- a/modules/account.module +++ b/modules/account.module @@ -140,8 +140,7 @@ function account_delete($name) { function account_edit_save($name, $edit) { foreach ($edit as $key=>$value) if ($key != "access") $query .= "$key = '". addslashes($value) ."', "; db_query("UPDATE users SET $query access = '' WHERE userid = '$name'"); - if ($edit[access]) foreach ($edit[access] as $key=>$value) user_set(user_load($name), "access", $value, 1); - + if ($edit[access]) foreach ($edit[access] as $key=>$value) db_query("UPDATE users SET access = '". field_set(user_load($name), "access", $value, 1) ."'"); watchdog("message", "account: modified user '$name'"); } -- cgit v1.2.3