- Made it possible to enter longer username such as 'Gerhard K*llesreit'.

- Updated database.mysql.
3-00
Dries Buytaert 2001-06-23 14:59:15 +00:00
parent f890592b2f
commit 5ff9dd653f
4 changed files with 16 additions and 40 deletions

View File

@ -1,5 +1,3 @@
DROP TABLE IF EXISTS access;
CREATE TABLE access (
id tinyint(10) DEFAULT '0' NOT NULL auto_increment,
mask varchar(255) DEFAULT '' NOT NULL,
@ -9,7 +7,6 @@ CREATE TABLE access (
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS blocks;
CREATE TABLE blocks (
name varchar(64) DEFAULT '' NOT NULL,
module varchar(64) DEFAULT '' NOT NULL,
@ -21,7 +18,6 @@ CREATE TABLE blocks (
PRIMARY KEY (name)
);
DROP TABLE IF EXISTS book;
CREATE TABLE book (
lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
nid int(10) unsigned DEFAULT '0' NOT NULL,
@ -34,7 +30,6 @@ CREATE TABLE book (
PRIMARY KEY (lid)
);
DROP TABLE IF EXISTS boxes;
CREATE TABLE boxes (
id tinyint(4) DEFAULT '0' NOT NULL auto_increment,
subject varchar(64) DEFAULT '' NOT NULL,
@ -47,7 +42,6 @@ CREATE TABLE boxes (
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS bundle;
CREATE TABLE bundle (
bid int(11) DEFAULT '0' NOT NULL auto_increment,
title varchar(255) DEFAULT '' NOT NULL,
@ -56,7 +50,6 @@ CREATE TABLE bundle (
PRIMARY KEY (bid)
);
DROP TABLE IF EXISTS category;
CREATE TABLE category (
cid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
name varchar(32) DEFAULT '' NOT NULL,
@ -71,7 +64,6 @@ CREATE TABLE category (
PRIMARY KEY (cid)
);
DROP TABLE IF EXISTS channel;
CREATE TABLE channel (
id int(11) DEFAULT '0' NOT NULL auto_increment,
site varchar(255) DEFAULT '' NOT NULL,
@ -85,7 +77,6 @@ CREATE TABLE channel (
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS collection;
CREATE TABLE collection (
cid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
name varchar(32) DEFAULT '' NOT NULL,
@ -94,7 +85,6 @@ CREATE TABLE collection (
PRIMARY KEY (cid)
);
DROP TABLE IF EXISTS comments;
CREATE TABLE comments (
cid int(6) DEFAULT '0' NOT NULL auto_increment,
pid int(6) DEFAULT '0' NOT NULL,
@ -112,7 +102,6 @@ CREATE TABLE comments (
KEY lid (lid)
);
DROP TABLE IF EXISTS cvs;
CREATE TABLE cvs (
user varchar(32) DEFAULT '' NOT NULL,
files text,
@ -121,7 +110,6 @@ CREATE TABLE cvs (
timestamp int(11) DEFAULT '0' NOT NULL
);
DROP TABLE IF EXISTS diaries;
CREATE TABLE diaries (
id int(5) DEFAULT '0' NOT NULL auto_increment,
author int(6) DEFAULT '0' NOT NULL,
@ -130,7 +118,6 @@ CREATE TABLE diaries (
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS diary;
CREATE TABLE diary (
lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
nid int(10) unsigned DEFAULT '0' NOT NULL,
@ -138,7 +125,6 @@ CREATE TABLE diary (
PRIMARY KEY (lid)
);
DROP TABLE IF EXISTS entry;
CREATE TABLE entry (
eid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
name varchar(32) DEFAULT '' NOT NULL,
@ -148,7 +134,6 @@ CREATE TABLE entry (
PRIMARY KEY (eid)
);
DROP TABLE IF EXISTS feed;
CREATE TABLE feed (
fid int(11) DEFAULT '0' NOT NULL auto_increment,
title varchar(255) DEFAULT '' NOT NULL,
@ -162,7 +147,6 @@ CREATE TABLE feed (
PRIMARY KEY (fid)
);
DROP TABLE IF EXISTS file;
CREATE TABLE file (
lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
nid int(10) unsigned DEFAULT '0' NOT NULL,
@ -175,7 +159,6 @@ CREATE TABLE file (
PRIMARY KEY (lid)
);
DROP TABLE IF EXISTS forum;
CREATE TABLE forum (
lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
nid int(10) unsigned DEFAULT '0' NOT NULL,
@ -183,7 +166,6 @@ CREATE TABLE forum (
PRIMARY KEY (lid)
);
DROP TABLE IF EXISTS item;
CREATE TABLE item (
iid int(11) DEFAULT '0' NOT NULL auto_increment,
fid int(11) DEFAULT '0' NOT NULL,
@ -196,13 +178,11 @@ CREATE TABLE item (
PRIMARY KEY (iid)
);
DROP TABLE IF EXISTS layout;
CREATE TABLE layout (
user int(11) DEFAULT '0' NOT NULL,
block varchar(64) DEFAULT '' NOT NULL
);
DROP TABLE IF EXISTS locales;
CREATE TABLE locales (
id int(11) DEFAULT '0' NOT NULL auto_increment,
location varchar(128) DEFAULT '' NOT NULL,
@ -218,13 +198,11 @@ CREATE TABLE locales (
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS modules;
CREATE TABLE modules (
name varchar(64) DEFAULT '' NOT NULL,
PRIMARY KEY (name)
);
DROP TABLE IF EXISTS node;
CREATE TABLE node (
nid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
lid int(10) DEFAULT '0' NOT NULL,
@ -251,7 +229,6 @@ CREATE TABLE node (
KEY status (status)
);
DROP TABLE IF EXISTS page;
CREATE TABLE page (
lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
nid int(10) unsigned DEFAULT '0' NOT NULL,
@ -260,7 +237,6 @@ CREATE TABLE page (
PRIMARY KEY (lid)
);
DROP TABLE IF EXISTS poll;
CREATE TABLE poll (
lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
nid int(10) unsigned DEFAULT '0' NOT NULL,
@ -270,7 +246,6 @@ CREATE TABLE poll (
PRIMARY KEY (lid)
);
DROP TABLE IF EXISTS poll_choices;
CREATE TABLE poll_choices (
chid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
nid int(10) unsigned DEFAULT '0' NOT NULL,
@ -280,7 +255,6 @@ CREATE TABLE poll_choices (
PRIMARY KEY (chid)
);
DROP TABLE IF EXISTS rating;
CREATE TABLE rating (
user int(6) DEFAULT '0' NOT NULL,
new int(6) DEFAULT '0' NOT NULL,
@ -288,7 +262,14 @@ CREATE TABLE rating (
PRIMARY KEY (user)
);
DROP TABLE IF EXISTS story;
CREATE TABLE role (
rid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
name varchar(32) DEFAULT '' NOT NULL,
perm text NOT NULL,
UNIQUE name (name),
PRIMARY KEY (rid)
);
CREATE TABLE story (
lid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
nid int(10) unsigned DEFAULT '0' NOT NULL,
@ -297,7 +278,6 @@ CREATE TABLE story (
PRIMARY KEY (lid)
);
DROP TABLE IF EXISTS tag;
CREATE TABLE tag (
tid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
name varchar(32) DEFAULT '' NOT NULL,
@ -307,7 +287,6 @@ CREATE TABLE tag (
PRIMARY KEY (tid)
);
DROP TABLE IF EXISTS topic;
CREATE TABLE topic (
tid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
pid int(10) unsigned DEFAULT '0' NOT NULL,
@ -317,11 +296,10 @@ CREATE TABLE topic (
PRIMARY KEY (tid)
);
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
name varchar(60) DEFAULT '' NOT NULL,
userid varchar(15) DEFAULT '' NOT NULL,
userid varchar(32) DEFAULT '' NOT NULL,
passwd varchar(20) DEFAULT '' NOT NULL,
real_email varchar(60) DEFAULT '' NOT NULL,
fake_email varchar(60) DEFAULT '' NOT NULL,
@ -340,18 +318,16 @@ CREATE TABLE users (
timezone varchar(8),
rating decimal(8,2),
language char(2) DEFAULT '' NOT NULL,
access varchar(255) DEFAULT '' NOT NULL,
role varchar(32) DEFAULT '' NOT NULL,
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS variable;
CREATE TABLE variable (
name varchar(32) DEFAULT '' NOT NULL,
value text NOT NULL,
PRIMARY KEY (name)
);
DROP TABLE IF EXISTS watchdog;
CREATE TABLE watchdog (
id int(5) DEFAULT '0' NOT NULL auto_increment,
user int(6) DEFAULT '0' NOT NULL,

View File

@ -27,7 +27,7 @@ function theme_init() {
}
function theme_link() {
global $theme;
global $user, $theme;
$links[] = array("index.php", t("home"));
$links[] = array("search.php", t("search"));
$links[] = array("submit.php", t("submit"));
@ -37,10 +37,6 @@ function theme_link() {
if (module_hook($name, "page")) $links[] = array("module.php?mod=$name", t($name));
}
// if (module_exist("forum")) $links[] = "<A HREF=\"module.php?mod=forum\">".t("forum") ."</A>";
// if (module_exist("diary")) $links[] = "<A HREF=\"module.php?mod=diary\">". t("diary") ."</A>";
// if (module_exist("book")) $links[] = "<A HREF=\"module.php?mod=book\">". t("handbook") ."</A>";
return $theme->links($links, 2);
}

View File

@ -82,7 +82,7 @@ function user_validate_name($name) {
if (eregi(" \$", $name)) return t("the username can not end with a space.");
if (eregi(" ", $name)) return t("the username can not contain multiple spaces in a row.");
if (eregi("[^a-zA-Z0-9 ]", $name)) return t("the username contains an illegal character.");
if (strlen($name) > 15) return t("the username '$name' is too long: it must be less than 15 characters.");
if (strlen($name) > 32) return t("the username '$name' is too long: it must be less than 32 characters.");
}
function user_validate_mail($mail) {

View File

@ -278,3 +278,7 @@ CREATE TABLE role (
ALTER TABLE users ADD role varchar(32) DEFAULT '' NOT NULL;
ALTER TABLE users DROP access;
UPDATE users SET role = 'authenticated user';
#23/06/01
ALTER TABLE users CHANGE userid userid VARCHAR(32) DEFAULT '' NOT NULL;