diff options
author | Arun Persaud <arun@nubati.net> | 2012-06-09 08:53:39 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2012-06-09 09:48:09 -0700 |
commit | 5d1647f138763213a32e3e1ba426e3f86157f018 (patch) | |
tree | 0b7c1ffdf98bd0f42c4e09377e3747f3535478f9 /digest.php | |
parent | 21099cf40f1696e4e2213e3a497246a2e5570209 (diff) | |
download | e-DoKo-5d1647f138763213a32e3e1ba426e3f86157f018.tar.gz e-DoKo-5d1647f138763213a32e3e1ba426e3f86157f018.tar.bz2 e-DoKo-5d1647f138763213a32e3e1ba426e3f86157f018.zip |
Remove games from digest where the player already moved
Diffstat (limited to 'digest.php')
-rw-r--r-- | digest.php | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -105,6 +105,16 @@ foreach($users as $uid) // get messages $messages = DB_get_digest_message_by_email($email); + // check messages for outdated ones and delete those + foreach ($messages as $key=>$mess) + { + if($mess[2] == 'your_turn' && $uid != DB_get_player_by_gameid($mess[3]) ) + { + DB_digest_delete_message($mess[0]); + unset($messages[$key]); + } + } + // add them together if(sizeof($messages)) { |