From: Arun Persaud Date: Tue, 17 Sep 2013 00:10:44 +0000 (-0700) Subject: BUGFIX: fixed selection of spade and heart solo X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=c42caf707e7b0b9e4e22a2d15b034b39101172e1 BUGFIX: fixed selection of spade and heart solo two typos messed up the solo selction, e.g. the gametype was not the same as the one given in the enum in the database. Also added an additional check before we set them in the database, so that people can mess things up when playing with the url directly. --- diff --git a/include/game.php b/include/game.php index 7c8064c..86fd53c 100644 --- a/include/game.php +++ b/include/game.php @@ -571,6 +571,17 @@ switch($mystatus) { /* user wants to play a solo */ + /* double check input value */ + $s = $_REQUEST['solo']; + $solos = array('trumpless','jack','queen','trump','club','spade','heart'); + if (!in_array($s, $solos)) + { + $messages[] = sprintf(_('There is a problem with the type of solo you selected (%s does not exist), please go back '. + 'and answer the question again.'), + $s,$INDEX.'?action=game&me=$me&in=yes'); + break; + } + /* store the info in the user's hand info */ DB_set_solo_by_hash($me,$_REQUEST['solo']); DB_set_sickness_by_hash($me,'solo'); diff --git a/include/output.php b/include/output.php index 6e5f15f..6a61b08 100644 --- a/include/output.php +++ b/include/output.php @@ -274,8 +274,8 @@ function output_check_for_sickness($me,$mycards) echo ' '; echo ' '; echo ' '; - echo ' '; - echo ' '; + echo ' '; + echo ' '; echo ' '; echo '
';