BUGFIX: wrong order of arguments for in_array function
authorArun Persaud <arun@nubati.net>
Sun, 18 Jan 2009 07:11:49 +0000 (23:11 -0800)
committerArun Persaud <arun@nubati.net>
Sun, 18 Jan 2009 07:11:49 +0000 (23:11 -0800)
just need to switch them... should be ok now.

include/newgame.php

index 7a88a80ba469c1bf5b60e35519df39c902946b07..8930b130c6e74c06975b03b1cdd46ada739bf37f 100644 (file)
@@ -27,7 +27,7 @@ else
        $names = DB_get_all_user_names_open_for_games();
 
        /* add player if he is not open for games */
        $names = DB_get_all_user_names_open_for_games();
 
        /* add player if he is not open for games */
-       if(!in_array($names,$_SESSION["name"]))
+       if(!in_array($_SESSION["name"],$names))
          $names[]=$_SESSION["name"];
 
        /* add some randomness */
          $names[]=$_SESSION["name"];
 
        /* add some randomness */