From bd4f8b6739b67a95f89c0d2f614ae413c510bbd8 Mon Sep 17 00:00:00 2001 From: james Date: Tue, 7 Jun 2005 21:36:07 +0000 Subject: [PATCH] whoops, the code for the fairmanager was messed up - should be fixed now also set the fair manager to the superuser on installation --- db/db.full.7.sql | 2 +- db/db.update.7.sql | 2 +- install3.php | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/db/db.full.7.sql b/db/db.full.7.sql index aea0b3a6..2ca2eddc 100644 --- a/db/db.full.7.sql +++ b/db/db.full.7.sql @@ -754,7 +754,7 @@ INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_pu INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. (date|registration). If "date" is used, it must be configured under "Important Dates" section.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); +INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the fair manager. Any important emails etc generated by the system will be sent here', -1); INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); diff --git a/db/db.update.7.sql b/db/db.update.7.sql index 52db0cd1..251e6b19 100644 --- a/db/db.update.7.sql +++ b/db/db.update.7.sql @@ -19,7 +19,7 @@ INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('committee_pu INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('judges_password_expiry_days', '365', 'Judges passwords expire and they are forced to choose a new one after this many days. (0 for no expiry)', -1); INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('maxspecialawardsperproject', '7', 'The maximum number of self-nominated special awards a project can sign-up for', -1); INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('specialawardnomination', 'date', 'Self nominations for special awards are due either with registration or on a specific date. (date|registration). If "date" is used, it must be configured under "Important Dates" section.', -1); -INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the ''fair manager''. Any important emails etc generated by the system will be sent here', -1); +INSERT INTO `config` (`var`, `val`, `description`, `year`) VALUES ('fairmanageremail', '', 'The email address of the fair manager. Any important emails etc generated by the system will be sent here', -1); INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'fairdate', 'Date of the fair', -1); INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regopen', 'Registration system opens', -1); INSERT INTO `dates` (`date`, `name`, `description`, `year`) VALUES ('', 'regclose', 'Registration system closes', -1); diff --git a/install3.php b/install3.php index 048eb744..47930f4a 100644 --- a/install3.php +++ b/install3.php @@ -116,6 +116,9 @@ if($_POST['action']=="save") //add the actual fair name, and just insert the defaults of everything else if($r->var=="fairname") mysql_query("INSERT INTO config (var,val,description,year) VALUES ('$r->var','".mysql_escape_string(stripslashes($_POST['fairname']))."','$r->description','".$_POST['fairyear']."')"); + //add the fair manager as well + else if($r->var=="fairmanager") + mysql_query("INSERT INTO config (var,val,description,year) VALUES ('$r->var','".mysql_escape_string(stripslashes($_POST['email']))."','$r->description','".$_POST['fairyear']."')"); else mysql_query("INSERT INTO config (var,val,description,year) VALUES ('$r->var','$r->val','$r->description','".$_POST['fairyear']."')"); }