diff options
author | Arun Persaud <arun@nubati.net> | 2009-03-16 22:06:21 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2009-03-29 10:47:55 -0700 |
commit | 6206ef89ad9a9a1a541ecb67971815d11f12199b (patch) | |
tree | 86af68a4ce38a5c88d3c491a707b6df8c9ded337 /include/user.php | |
parent | 3fd01c7b9fa78fb08ca1ad61c1de850b9a6b9870 (diff) | |
download | e-DoKo-6206ef89ad9a9a1a541ecb67971815d11f12199b.tar.gz e-DoKo-6206ef89ad9a9a1a541ecb67971815d11f12199b.tar.bz2 e-DoKo-6206ef89ad9a9a1a541ecb67971815d11f12199b.zip |
BUGFIX: store canceled games, don't delete them
deleting the games could result in the same people getting the same hand redealt over and over again.
By just keeping track of the hands in the game table, this problem should be gone.
Fixed issue #50.
Diffstat (limited to 'include/user.php')
-rw-r--r-- | include/user.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/user.php b/include/user.php index 8855fc0..0273183 100644 --- a/include/user.php +++ b/include/user.php @@ -154,7 +154,7 @@ else $Multi = ($r[5]>1) ? "multi" : ""; if($r[4]=='pre') echo " <span class=\"gamestatuspre $Multi\"><a href=\"".$INDEX."?action=game&me=".$r[0]."\">p </a></span>\n"; - else if ($r[4]=='gameover') + else if (in_array($r[4],array('gameover','cancel-timedout','cancel-nines','cancel-noplay','cancel-trump'))) { echo " <span class=\"gamestatusover $Multi\"><a href=\"".$INDEX."?action=game&me=".$r[0]."\">"; if($r[5]<2) @@ -165,7 +165,7 @@ else } else echo " <span class=\"gamestatusplay $Multi\"><a href=\"".$INDEX."?action=game&me=".$r[0]."\">P </a></span>\n"; - if($r[4] != 'gameover') + if($r[4] == 'pre' || $r[4] == 'play') { echo "</td>\n<td>\n "; if($r[3]==$myid || !$r[3]) @@ -190,8 +190,7 @@ else echo "(it's $name's turn)\n"; }; if(time()-strtotime($r[2]) > 60*60*24*30) - echo "<a href=\"$INDEX?action=cancel&me=".$r[0]."\">Cancel?</a>". - " (clicking here is final and can't be restored)"; + echo "<a href=\"$INDEX?action=cancel&me=".$r[0]."\">Cancel?</a> "; } } echo "</td></tr>\n</table>\n"; |