summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2003-10-23 15:31:10 (GMT)
committer Dries Buytaert2003-10-23 15:31:10 (GMT)
commitf2fe2f02558b0d1823d17a6354b92ae00df2b28e (patch)
treeb5aa39cad8bc9b5928d2871c3ed25ef5479bc8ee
parentc54b68c8da0566cfd289f3937946c6c2c711a2e9 (diff)
- Bugfix: don't set a name and e-mail address for the anonymous user. Fixes
bug #3740.
-rw-r--r--database/database.mssql2
-rw-r--r--database/database.mysql2
-rw-r--r--database/database.pgsql2
-rw-r--r--update.php8
4 files changed, 8 insertions, 6 deletions
diff --git a/database/database.mssql b/database/database.mssql
index 21a8d72..6b8a3e4 100644
--- a/database/database.mssql
+++ b/database/database.mssql
@@ -503,7 +503,7 @@ INSERT INTO system VALUES ('themes/marvin/marvin.theme','marvin','theme','Intern
INSERT INTO variable(name,value) VALUES('update_start', 's:10:"2003-10-22";');
INSERT INTO variable(name,value) VALUES('theme_default','s:6:"marvin";');
-INSERT INTO users(uid,name,mail,rid) VALUES(0,'Anonymous','root@localhost','1');
+INSERT INTO users(uid,name,mail,rid) VALUES(0,'','','1');
INSERT INTO blocks(module,delta,status,custom,region,weight,path) VALUES('user', 0, 1, 0, 1, 0, '');
INSERT INTO blocks(module,delta,status,custom,region,weight,path) VALUES('user', 1, 1, 0, 1, 0, '');
diff --git a/database/database.mysql b/database/database.mysql
index 115a736..2677a49 100644
--- a/database/database.mysql
+++ b/database/database.mysql
@@ -588,7 +588,7 @@ INSERT INTO system VALUES ('modules/page.module','page','module','',1);
INSERT INTO system VALUES ('modules/story.module','story','module','',1);
INSERT INTO system VALUES ('modules/taxonomy.module','taxonomy','module','',1);
INSERT INTO system VALUES ('themes/marvin/marvin.theme','marvin','theme','Internet explorer, Netscape, Opera',1);
-INSERT INTO users (uid, name, mail, rid) VALUES ('0', 'Anonymous', 'root@localhost', '1');
+INSERT INTO users (uid, name, mail, rid) VALUES ('0', '', '', '1');
REPLACE variable SET name='update_start', value='s:10:"2003-10-22;"';
REPLACE variable SET name='theme_default', value='s:6:"marvin";';
diff --git a/database/database.pgsql b/database/database.pgsql
index 4bf21d8..9227f17 100644
--- a/database/database.pgsql
+++ b/database/database.pgsql
@@ -592,7 +592,7 @@ INSERT INTO system VALUES ('themes/marvin/marvin.theme','marvin','theme','Intern
INSERT INTO variable(name,value) VALUES('update_start', 's:10:"2003-10-22";');
INSERT INTO variable(name,value) VALUES('theme_default','s:6:"marvin";');
-INSERT INTO users(uid,name,mail,rid) VALUES(0,'Anonymous','root@localhost', '1');
+INSERT INTO users(uid,name,mail,rid) VALUES(0,'','', '1');
INSERT INTO blocks(module,delta,status) VALUES('user', '0', '1');
INSERT INTO blocks(module,delta,status) VALUES('user', '1', '1');
diff --git a/update.php b/update.php
index ef36232..d504f4a 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;");
}
/*