BUGFIX: didn't set next player correctly during startup
authorArun Persaud <arun@nubati.net>
Sat, 5 Jan 2008 21:24:10 +0000 (22:24 +0100)
committerArun Persaud <arun@nubati.net>
Sat, 5 Jan 2008 22:21:30 +0000 (23:21 +0100)
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>
index.php

index 6729d5688c0058cc226cbb0dd3998a2f5fb981f0..eb52e4e1d2826467f74476a3ade6cd9c10d0ebf2 100644 (file)
--- 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:".