From: Arun Persaud Date: Sun, 6 Jan 2008 19:01:25 +0000 (+0100) Subject: BUGFIX: show that is is your turn after a new game has been created X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=a5274cbae84c49977d6d1195d8c4e7a3d96391a1;ds=sidebyside BUGFIX: show that is is your turn after a new game has been created if there was no player set for a new game, the user page didn't show that is was your turn in that game Signed-off-by: Arun Persaud --- diff --git a/index.php b/index.php index 6807fa6..0036433 100644 --- a/index.php +++ b/index.php @@ -2196,21 +2196,18 @@ else if( myisset("email","password") || isset($_SESSION["name"]) ) if($r[4] != 'gameover') { echo "\n "; - if($r[3]) + if($r[3]==$myid || !$r[3]) + echo "(it's your turn)\n"; + else { - if($r[3]==$myid) - echo "(it's your turn)\n"; - else - { - $name = DB_get_name_by_userid($r[3]); - $gameid = $r[1]; - if(DB_get_reminder($r[3],$gameid)==0) - if(time()-strtotime($r[2]) > 60*60*24*7) - echo "". - "Send a reminder."; - echo "(it's $name's turn)\n"; - }; - } + $name = DB_get_name_by_userid($r[3]); + $gameid = $r[1]; + if(DB_get_reminder($r[3],$gameid)==0) + if(time()-strtotime($r[2]) > 60*60*24*7) + echo "". + "Send a reminder."; + echo "(it's $name's turn)\n"; + }; if(time()-strtotime($r[2]) > 60*60*24*30) echo "". "Cancel?".