From ac3053318dcaec0b4003b99853f6df8719c77938 Mon Sep 17 00:00:00 2001 From: james Date: Tue, 7 Jun 2005 20:22:25 +0000 Subject: [PATCH] when creating the superuser, make sure they get admin/config/super=Y also fix the config/dates insert queries so they will work --- install3.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install3.php b/install3.php index 86f96c16..7e32d742 100644 --- a/install3.php +++ b/install3.php @@ -122,19 +122,19 @@ 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']."'"); + mysql_query("INSERT INTO config (var,val,description,year) VALUES ('$r->var','".mysql_escape_string(stripslashes($_POST['fairname']))."','$r->description','".$_POST['fairyear']."')"); else - mysql_query("INSERT INTO config (var,val,description,year) VALUES ('$r->var','$r->val','$r->description','".$_POST['fairyear']."'"); + mysql_query("INSERT INTO config (var,val,description,year) VALUES ('$r->var','$r->val','$r->description','".$_POST['fairyear']."')"); } //copy over the dates defautls $q=mysql_query("SELECT * FROM dates WHERE year='-1'"); while($r=mysql_fetch_object($q)) { - mysql_query("INSERT INTO dates (date,name,description,year) VALUES ('$r->date','$r->name','$r->description','".$_POST['fairyear']."'"); + mysql_query("INSERT INTO dates (date,name,description,year) VALUES ('$r->date','$r->name','$r->description','".$_POST['fairyear']."')"); } echo "Done!
"; echo "Creating superuser account..."; - mysql_query("INSERT INTO committees_members (email,emailprivate,password) VALUES ('".$_POST['email']."','".$_POST['email']."','".$_POST['pass1']."')"); + mysql_query("INSERT INTO committees_members (email,emailprivate,password,access_admin,access_config,access_super) VALUES ('".$_POST['email']."','".$_POST['email']."','".$_POST['pass1']."','Y','Y','Y')"); echo mysql_error(); echo "Done!
";