summaryrefslogtreecommitdiffstats
path: root/include/cancelgame.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2009-03-16 22:06:21 -0700
committerArun Persaud <arun@nubati.net>2009-03-29 10:47:55 -0700
commit6206ef89ad9a9a1a541ecb67971815d11f12199b (patch)
tree86af68a4ce38a5c88d3c491a707b6df8c9ded337 /include/cancelgame.php
parent3fd01c7b9fa78fb08ca1ad61c1de850b9a6b9870 (diff)
downloade-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/cancelgame.php')
-rw-r--r--include/cancelgame.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/cancelgame.php b/include/cancelgame.php
index 2240203..71bb58b 100644
--- a/include/cancelgame.php
+++ b/include/cancelgame.php
@@ -48,8 +48,8 @@ if(time()-strtotime($r[0]) > 60*60*24*30) /* = 1 month */
mymail($user,$subject,$message);
}
- /* delete everything from the dB */
- DB_cancel_game($me);
+ /* set gamestatus to canceled */
+ cancel_game('timedout',$gameid);
echo "<p style=\"background-color:red\";>Game ".DB_format_gameid($gameid).
" has been canceled.<br /><br /></p>";