summaryrefslogtreecommitdiffstats
path: root/stats.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2008-04-06 22:25:44 -0700
committerArun Persaud <arun@nubati.net>2008-04-07 22:50:33 -0700
commit42aae8a38789ec102478db6dc58795c4b095546e (patch)
tree35ce04dfef884f798af74536d9596dd04ae4fcd1 /stats.php
parent661cdf100d59bb0d7ee3ade0d392efa68aba1a19 (diff)
downloade-DoKo-42aae8a38789ec102478db6dc58795c4b095546e.tar.gz
e-DoKo-42aae8a38789ec102478db6dc58795c4b095546e.tar.bz2
e-DoKo-42aae8a38789ec102478db6dc58795c4b095546e.zip
CLEANUP: started some database cleanup and added some more comments
instead of having a different function for each possible way to query for example the full name of a player, there is now only one function with a switch statement that handles the different cases. Still not 100% perfect, but I think nicer to read than before. Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'stats.php')
-rw-r--r--stats.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/stats.php b/stats.php
index efd2c21..ec1d9b7 100644
--- a/stats.php
+++ b/stats.php
@@ -35,7 +35,7 @@ if(myisset("logout"))
else if( isset($_SESSION["name"]) )
{
$name = $_SESSION["name"];
- $email = DB_get_email_by_name($name);
+ $email = DB_get_email('name',$name);
$password = DB_get_passwd_by_name($name);
/* verify password and email */
@@ -43,7 +43,7 @@ else if( isset($_SESSION["name"]) )
$password = md5($password);
$ok = 1;
- $myid = DB_get_userid_by_email_and_password($email,$password);
+ $myid = DB_get_userid('email-password',$email,$password);
if(!$myid)
$ok = 0;