From 2666bb58429c385b716d2ffd5d5fe9a9e7af4f45 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Mon, 20 Oct 2008 19:54:13 -0700 Subject: BUGFIX: make user menu and personal notes appear again had them only shown when player was logged in, but there is really no reason to not show them to players who are not logged in in an ongoing game (only the correct player should get to a page with an ongoing game) Signed-off-by: Arun Persaud --- include/game.php | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'include/game.php') diff --git a/include/game.php b/include/game.php index 6141ab2..cfd1750 100644 --- a/include/game.php +++ b/include/game.php @@ -109,7 +109,15 @@ if( $mystatus!='gameover' ) if($note != '') DB_insert_note($note,$gameid,$myid); }; -output_user_notes($myid,$gameid,$mystatus); + +/* make sure that we don't show the notes to the wrong person + * (e.g. other people looking at an old game) + */ +if( $mystatus != 'gameover' || + ( $mystatus == 'gameover' && + isset($_SESSION['id']) && + $myid == $_SESSION['id'])) + output_user_notes($myid,$gameid,$mystatus); /* handle calls */ if(myisset('call') && $_REQUEST['call'] == '120' && can_call(120,$me)) @@ -1937,10 +1945,24 @@ switch($mystatus) default: myerror("error in testing the status"); } -/* output left menu */ -display_user_menu(); -/* output right menu */ +/* output other games where it is the users turn + * make sure that the people looking at old games don't see the wrong games here + */ +if( $mystatus != 'gameover' ) + display_user_menu($myid); +else if( $mystatus == 'gameover' && + isset($_SESSION['id']) ) + { + display_user_menu($_SESSION['id']); + } +else + { + echo "
\n"; + echo "It's your turn in these games:
\n"; + echo "Please log in to see this information.\n"; + echo "
\n"; + } /* display rule set for this game */ echo "
\n"; -- cgit v1.2.3-18-g5258