summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-10-23 15:31:10 +0000
committerDries Buytaert <dries@buytaert.net>2003-10-23 15:31:10 +0000
commitf2fe2f02558b0d1823d17a6354b92ae00df2b28e (patch)
treeb5aa39cad8bc9b5928d2871c3ed25ef5479bc8ee /update.php
parentc54b68c8da0566cfd289f3937946c6c2c711a2e9 (diff)
downloadbrdo-f2fe2f02558b0d1823d17a6354b92ae00df2b28e.tar.gz
brdo-f2fe2f02558b0d1823d17a6354b92ae00df2b28e.tar.bz2
- Bugfix: don't set a name and e-mail address for the anonymous user. Fixes
bug #3740.
Diffstat (limited to 'update.php')
-rw-r--r--update.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/update.php b/update.php
index ef362324b..d504f4a7b 100644
--- a/update.php
+++ b/update.php
@@ -440,11 +440,11 @@ function _update_next_thread($structure, $parent) {
function update_63() {
if ($GLOBALS["db_type"] == "pgsql") {
- update_sql("INSERT INTO {users} (uid, name, mail, timestamp) VALUES ('0', 'Anonymous', 'root@localhost', '". time() ."')");
+ update_sql("INSERT INTO {users} (uid, name, mail, timestamp) VALUES ('0', '', '', '". time() ."')");
}
else {
update_sql("ALTER TABLE {users} CHANGE uid uid int(10) unsigned NOT NULL default '0'");
- update_sql("INSERT INTO {users} (uid, name, mail, timestamp) VALUES ('0', 'Anonymous', 'root@localhost', '". time() ."')");
+ update_sql("INSERT INTO {users} (uid, name, mail, timestamp) VALUES ('0', '', '', '". time() ."')");
$users = db_result(db_query("SELECT MAX(uid) FROM {users};"));
update_sql("INSERT INTO {sequences} (name, id) VALUES ('users_uid', '$users')");
}
@@ -536,8 +536,10 @@ function update_69() {
else {
update_sql("ALTER TABLE {statistics} RENAME TO {node_counter}");
update_sql("ALTER TABLE {path} RENAME TO {url_alias}");
- update_sql("UPDATE {sequences} set name = '{url_alias}_pid' where name = '{path}_pid'");
+ update_sql("UPDATE {sequences} SET name = '{url_alias}_pid' WHERE name = '{path}_pid'");
}
+
+ update_sql("UPDATE {users} SET name = '' WHERE uid = 0;");
}
/*