BUGFIX: user menu didn't list all games where it is your turn
authorArun Persaud <arun@nubati.net>
Sun, 8 Jun 2008 18:06:19 +0000 (11:06 -0700)
committerArun Persaud <arun@nubati.net>
Sun, 8 Jun 2008 18:06:19 +0000 (11:06 -0700)
games where you need to decide if you want to play should be listed
in the menu on the left. The problem is that once somebody moved they
won't show up in the list anymore, since from that point on the server
keeps track of who needs to move next.

Signed-off-by: Arun Persaud <arun@nubati.net>
include/functions.php

index 8307648975873ed49ddfb4bf66e0ec7fb0e193e7..82b4bb6bbcde05c2fe2b74779d304b22d35062e5 100644 (file)
@@ -851,7 +851,7 @@ function display_user_menu()
   $result = DB_query("SELECT Hand.hash,Hand.game_id,Game.player from Hand".
                     " LEFT JOIN Game On Hand.game_id=Game.id".
                     " WHERE Hand.user_id='$myid'".
-                    " AND Game.player='$myid'".
+                    " AND ( Game.player='$myid' OR ISNULL(Game.player) )".
                     " AND Game.status<>'gameover'".
                     " ORDER BY Game.session" );