summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2008-01-05 22:24:10 +0100
committerArun Persaud <arun@nubati.net>2008-01-05 23:21:30 +0100
commit2264646817a59a6e3aefa835c492938dde4f25ee (patch)
treea22dcf600c255494a2344d037f58eb6cf7ac36c6
parentcd8b501f9cc5f726c79c3e6b8ef86b3c764e3dc0 (diff)
downloade-DoKo-2264646817a59a6e3aefa835c492938dde4f25ee.tar.gz
e-DoKo-2264646817a59a6e3aefa835c492938dde4f25ee.tar.bz2
e-DoKo-2264646817a59a6e3aefa835c492938dde4f25ee.zip
BUGFIX: didn't set next player correctly during startup
in db.game the next player is set with his user.id, but I used the position at the table in some places. fixed now Signed-off-by: Arun Persaud <arun@nubati.net>
-rw-r--r--index.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/index.php b/index.php
index 6729d56..eb52e4e 100644
--- a/index.php
+++ b/index.php
@@ -833,7 +833,8 @@ else if(myisset("me"))
{
$To = DB_get_email_by_pos_and_gameid($who,$gameid);
$userhash = DB_get_hash_from_game_and_pos($gameid,$who);
- DB_set_player_by_gameid($gameid,$who);
+ $userid = DB_get_userid_by_email($To);
+ DB_set_player_by_gameid($gameid,$userid);
$message = "Someone has poverty, it's your turn to decide, if you want to take the trump. Please visit:".
" ".$HOST.$INDEX."?me=".$userhash."\n\n" ;
@@ -913,7 +914,8 @@ else if(myisset("me"))
{
$To = DB_get_email_by_pos_and_gameid($who,$gameid);
$userhash = DB_get_hash_from_game_and_pos($gameid,$who);
- DB_set_player_by_gameid($gameid,$who);
+ $userid = DB_get_userid_by_email($To);
+ DB_set_player_by_gameid($gameid,$userid);
$message = "Someone has poverty, it's your turn to decide, ".
"if you want to take the trump. Please visit:".