summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarun <arun@nubati.net>2006-11-26 13:31:34 +0000
committerarun <arun>2006-11-26 13:31:34 +0000
commit01703346aa74f93edd32854c3e250907f3209cf3 (patch)
tree7b29d8fe6a37731b6f88b0b2385de36b9ac6b8e9
parentec0c90f663240dcc2568741a1c3af0acc716bf25 (diff)
downloade-DoKo-01703346aa74f93edd32854c3e250907f3209cf3.tar.gz
e-DoKo-01703346aa74f93edd32854c3e250907f3209cf3.tar.bz2
e-DoKo-01703346aa74f93edd32854c3e250907f3209cf3.zip
bugfix: when setting the winner for a trick a reload of the page was posiible causing trouble by adding the winner again to the status file
-rw-r--r--index.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/index.php b/index.php
index f4e323e..b8a7141 100644
--- a/index.php
+++ b/index.php
@@ -879,14 +879,14 @@ else
}
echo "</div></div>\n";
}
-
+
/* figure out who needs to play next */
$next = $last + 1;
if ($next>=4)
$next -= 4 ;
/* if no one has played yet or we are at the start of a new trick */
- if(strlen($history[sizeof($history)-1])==3)
+ if($last<0)
$next = $history[sizeof($history)-1][0];
/* are we trying to play a card? */
@@ -991,7 +991,7 @@ else
save_status();
}
- else if(isset($_REQUEST["win"]) && strlen($history[sizeof($history)-1])>3)
+ else if(isset($_REQUEST["win"]) && substr_count($history[sizeof($history)-1],":")==4)
{ /* count points, email winner */
$win = $_REQUEST["win"];