From ce094a1323d64743df35f8f87e40636be868de40 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 31 Jul 2005 10:12:47 +0000 Subject: - Patch #27633 by Tobias: + made it possible to specify a subject when submitting a message on the contact form. + fixed some bugs/glitches. --- database/updates.inc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'database/updates.inc') 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); -- cgit v1.2.3