BUGFIX: html output was messed up by some return statements
authorArun Persaud <arun@nubati.net>
Sat, 25 Jul 2009 04:35:57 +0000 (21:35 -0700)
committerArun Persaud <arun@nubati.net>
Sat, 25 Jul 2009 04:35:57 +0000 (21:35 -0700)
instead of using return, we now use a break, this has the advantage that extra output (such as menus) will still be present and the html should be ok.

include/game.php

index 73353825170470c09aca98186e9ab170d33b1217..30abe7d53687d8600f0c0ef51a6cc57c988e5f66 100644 (file)
@@ -610,9 +610,10 @@ switch($mystatus)
            /* update game status */
            cancel_game('nines',$gameid);
 
-           echo "The game has been canceled because ".DB_get_name('userid',$nines).
-             " has five or more nines and nobody is playing solo.\n";
-           return;
+           echo "<p>The game has been canceled because ".DB_get_name('userid',$nines).
+             " has five or more nines and nobody is playing solo.</p>\n";
+           echo "</div>\n";
+           break;
          }
        else if($poverty==1) /* one person has poverty */
          {
@@ -957,8 +958,8 @@ switch($mystatus)
                /* update game status */
                cancel_game('trump',$gameid);
 
-               echo "<p style=\"background-color:red\";>Game ".DB_format_gameid($gameid)." has been canceled.<br /><br /></p>";
-               return;
+               echo "<p class=\"message\";>Game ".DB_format_gameid($gameid)." has been canceled.<br /><br /></p>";
+               break;
              }
            else
              {