fixing up the "is setup" check in the installer
[gwvp.git] / gwvplib / gwvpsetup.php
index a6d63ac..a9e7a06 100644 (file)
@@ -21,13 +21,16 @@ function gwvp_PostSetup()
 
 function gwvp_PostSetupPageBody()
 {
-       echo "GWVP Is now setup, login at the top of the page and you should in control!";
+       echo "GWVP Is now setup, login at the top of the page and you should be in control!";
 }
 
 // TODO: need to do this bit
 function gwvp_issetup()
 {
-       return true;
+       // check for the config file
+       if(!file_exists("config.php")) return false;
+        
+       return gwvp_isDBSetup();
 }
 
 
@@ -87,7 +90,7 @@ function gwvp_goSetupGoMain()
        echo "<tr><td>Site Name</td><td><input type=\"text\" name=\"sitename\"></td><td>Some Name for your site</td></tr>";
        echo "<tr><td>First User Full Name</td><td><input type=\"text\" name=\"firstuserfullname\"></td><td>The name of the admin of your site</td></tr>";
        echo "<tr><td>First User email address</td><td><input type=\"text\" name=\"firstuseremail\"></td><td>The email address of the admin of your site (login)</td></tr>";
-       echo "<tr><td>First User Nick Name</td><td><input type=\"text\" name=\"firstusernickname\"></td><td>The name used to idenity the user on the site</td></tr>";
+       echo "<tr><td>First User Username</td><td><input type=\"text\" name=\"firstuserusername\"></td><td>The name used to idenity the user on the site</td></tr>";
        echo "<tr><td>First User Password</td><td><input type=\"text\" name=\"pass1\"></td><td>Password for the user</td></tr>";
        echo "<tr><td>First User Password (confirm)</td><td><input type=\"text\" name=\"pass2\"></td><td>and confirm it...</td></tr>";
        echo "<tr><td>Database Type</td><td><select name=\"dbtype\"><option value=\"sqlite\">SQLite</option></select></td><td>SQLite only at this point</td></tr>";
@@ -119,7 +122,7 @@ function gwvp_goSetupDoInstall()
        $sitename = $_REQUEST["sitename"];
        $fufn = $_REQUEST["firstuserfullname"];
        $fwem = $_REQUEST["firstuseremail"];
-       $fwnick = $_REQUEST["firstusernickname"];
+       $fwusername = $_REQUEST["firstuserusername"];
        $fwpass = $_REQUEST["pass1"];
        $fwpassconf = $_REQUEST["pass2"];
        $dbtype = $_REQUEST["dbtype"];
@@ -132,7 +135,7 @@ function gwvp_goSetupDoInstall()
        echo "<tr><td>Sitename</td><td>$sitename</td></tr>";
        echo "<tr><td>fullname</td><td>$fufn</td></tr>";
        echo "<tr><td>email</td><td>$fwem</td></tr>";
-       echo "<tr><td>nick</td><td>$fwnick</td></tr>";
+       echo "<tr><td>username</td><td>$fwusername</td></tr>";
        echo "<tr><td>pass</td><td>$fwpass</td></tr>";
        echo "<tr><td>passconfirm</td><td>$fwpassconf</td></tr>";
        echo "<tr><td>dbtype</td><td>$dbtype</td></tr>";