BUGFIX: counted cancled games as active games in the statistics
authorArun Persaud <arun@nubati.net>
Fri, 7 Aug 2009 04:04:33 +0000 (21:04 -0700)
committerArun Persaud <arun@nubati.net>
Fri, 7 Aug 2009 04:04:33 +0000 (21:04 -0700)
instead of testing if the game was in 'pre' or 'play' modus I just tested for <> 'gameover' which also included games which where canceled because of e.g. five nines.

include/stats.php

index 1e6a033ea5986fca7bd4a11610cdb7b2118aef33..f450880afde6ae302592b4b44b30330d413916a0 100644 (file)
@@ -190,7 +190,7 @@ if( !$content = getCache("cache/stats.html",60*60*24) )
                               " FROM Hand".
                               " LEFT JOIN User ON User.id=user_id".
                               " LEFT JOIN Game ON Game.id=game_id".
-                              " WHERE Game.status<>'gameover'".
+                              " WHERE Game.status IN ('pre','play')".
                               " GROUP BY user_id".
                               " ORDER BY c DESC LIMIT 7" );
   array_unshift($result,array("Name","Number of active games"));