summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2008-05-18 17:45:03 -0700
committerArun Persaud <arun@nubati.net>2008-05-18 17:45:03 -0700
commita40c1ed8a796ad846a254da83a83ae92c3184228 (patch)
treec0b9b479902d469e488f64b7caff8915fa9117e3 /include
parente525ec3c4a6e6234fd63caad097845cc2935fc1b (diff)
downloade-DoKo-a40c1ed8a796ad846a254da83a83ae92c3184228.tar.gz
e-DoKo-a40c1ed8a796ad846a254da83a83ae92c3184228.tar.bz2
e-DoKo-a40c1ed8a796ad846a254da83a83ae92c3184228.zip
BUGFIX: forgot to set default values for some new variables
$GAME['schweinchen-who'] was not necessary defined Signed-off-by: Arun Persaud <arun@nubati.net>
Diffstat (limited to 'include')
-rw-r--r--include/game.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/game.php b/include/game.php
index bbaa5b3..a90d8b2 100644
--- a/include/game.php
+++ b/include/game.php
@@ -26,6 +26,8 @@ if(!$myid)
exit();
}
+global $GAME,$RULES,$CARDS;
+
/* user might get here by clicking on the link in an email, so session might not be set */
if(isset($_SESSION["name"]))
output_status($_SESSION["name"]);
@@ -76,6 +78,11 @@ else
$ok=1;
}
+/* these are the defaults */
+$GAME['schweinchen-who'] = NULL;
+$GAME['schweinchen-first'] = NULL;
+$GAME['schweinchen-second'] = NULL;
+
if($ok)
{
/* need to check for Schweinchen */
@@ -89,11 +96,6 @@ if($ok)
$GAME['schweinchen-first'] = 0; /* to keep track if they have been played already */
$GAME['schweinchen-second'] = 0;
}
-else
-{
- /* no need to check for Schweinchen */
- $GAME['schweinchen-who']=NULL;
-}
/* end check for Schweinchen */
set_gametype($gametype); /* this sets the $CARDS variable */