diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-07-31 10:12:47 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-07-31 10:12:47 +0000 |
commit | ce094a1323d64743df35f8f87e40636be868de40 (patch) | |
tree | 0b487a309b1402ad42105be3803494bcc63c537c /database | |
parent | 9e6373820a5205f00d5a350009d4887f85ada88a (diff) | |
download | brdo-ce094a1323d64743df35f8f87e40636be868de40.tar.gz brdo-ce094a1323d64743df35f8f87e40636be868de40.tar.bz2 |
- Patch #27633 by Tobias:
+ made it possible to specify a subject when submitting a message on the contact form.
+ fixed some bugs/glitches.
Diffstat (limited to 'database')
-rw-r--r-- | database/database.mysql | 7 | ||||
-rw-r--r-- | database/database.pgsql | 5 | ||||
-rw-r--r-- | database/updates.inc | 17 |
3 files changed, 23 insertions, 6 deletions
diff --git a/database/database.mysql b/database/database.mysql index 66bbfb26e..56a6cd87a 100644 --- a/database/database.mysql +++ b/database/database.mysql @@ -201,10 +201,11 @@ CREATE TABLE comments ( -- CREATE TABLE contact ( - subject varchar(255) NOT NULL default '', + category varchar(255) NOT NULL default '', recipients longtext NOT NULL default '', - reply longtext NOT NULL default '' -); + reply longtext NOT NULL default '', + PRIMARY KEY (category) +) TYPE=MyISAM; -- -- Table structre for table 'node_comment_statistics' diff --git a/database/database.pgsql b/database/database.pgsql index 22e7f6cd6..c964db4b4 100644 --- a/database/database.pgsql +++ b/database/database.pgsql @@ -197,9 +197,10 @@ CREATE INDEX comments_nid_idx ON comments(nid); -- CREATE TABLE contact ( - subject varchar(255) NOT NULL default '', + category varchar(255) NOT NULL default '', recipients text NOT NULL default '', - reply text NOT NULL default '' + reply text NOT NULL default '', + PRIMARY KEY (category) ); -- diff --git a/database/updates.inc b/database/updates.inc index f6c13f4c9..70e4038b1 100644 --- a/database/updates.inc +++ b/database/updates.inc @@ -118,7 +118,8 @@ $sql_updates = array( "2005-05-11" => "update_139", "2005-05-12" => "update_140", "2005-05-22" => "update_141", - "2005-07-29" => "update_142" + "2005-07-29" => "update_142", + "2005-07-30" => "update_143" ); function update_32() { @@ -2518,6 +2519,20 @@ function update_142() { return $ret; } +function update_143() { + $ret = array(); + + if ($GLOBALS['db_type'] == 'mysql') { + $ret[] = update_sql("ALTER TABLE {contact} CHANGE subject category VARCHAR(255) NOT NULL "); + } + elseif ($GLOBALS['db_type'] == 'pgsql') { + $ret[] = update_sql("ALTER TABLE {contact} RENAME COLUMN subject TO category"); + } + $ret[] = update_sql("ALTER TABLE {contact} ADD PRIMARY KEY (category)"); + + return $ret; +} + function update_sql($sql) { $edit = $_POST["edit"]; $result = db_query($sql); |