X-Git-Url: http://git.euphorik.ch/?p=cl7.git;a=blobdiff_plain;f=php%2Fcontroller.php;h=41381ac913c97be33ce092037a8dd05b4b960597;hp=cad43528819580bc7ec86ae6e30f54503f5ef242;hb=912c54815fb34d93de674af2bcf3acc85ce7421d;hpb=c75da06bb039de2a43f21b6e853a72745f753dca diff --git a/php/controller.php b/php/controller.php index cad4352..41381ac 100644 --- a/php/controller.php +++ b/php/controller.php @@ -96,7 +96,7 @@ class Controller } } # vote pour des jeux (autorisé même lorsque les inscriptions sont terminées) - else if (isset($_POST['set_jeux_joues']) && $this->participant->existe()) + else if (isset($_POST['set_jeux_joues']) && $this->participant->existe() && !$config->get("inscription_terminees")) { $votes = $_POST['votes']; if (!$votes) @@ -121,7 +121,8 @@ class Controller pg_query("BEGIN"); $res = pg_query_params("SELECT id FROM jeux WHERE nom = $1", array($jeu)); if ($id = pg_fetch_object($res)) - array_unshift($votes, $id->id); + if (!in_array($id->id, $votes)) + array_unshift($votes, $id->id); } }