changeset 107:6e076b3630a0

Cleanup the code a bit.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 21 Oct 2013 22:47:29 +0300
parents 324f3a415237
children 70bf38b071dd
files admin.inc.php
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/admin.inc.php	Mon Oct 21 22:11:40 2013 +0300
+++ b/admin.inc.php	Mon Oct 21 22:47:29 2013 +0300
@@ -35,14 +35,9 @@
 {
   echo "<h1>Oh noes, admin configuration not done!</h1>\n".
   "<p>Better go and prod that, so you get to use the fine admin interface.</p>\n";
-  $authState = "error";
 }
 else
-if (stAdmSessionAuth())
-{
-  $authState = "ok";
-}
-else
+if (!stAdmSessionAuth(FALSE))
 {
   // Perform authentication if we are not in session already
   echo
@@ -53,11 +48,8 @@
     stGetFormPasswordInput("admpass", "", "")."\n".
     stGetFormSubmitInput("submit", "Login").
     "</form>\n";
-
-  $authState = "login";
 }
-
-if ($authState == "ok")
+else
 {
 ?>
 <script type="text/javascript">