Skip to content

Commit

Permalink
correctif : une requête mal placée modifiait à tort le statut de la c…
Browse files Browse the repository at this point in the history
…lé et de la ressource
  • Loading branch information
ynaessens authored and JeromeDevome committed Dec 14, 2024
1 parent d9e2f6f commit eadc9ea
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions admin/controleurs/admin_edit_room.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* admin_edit_room.php
* Script de création/modification des ressources de l'application GRR
* Dernière modification : $Date: 2023-09-13 16:29$
* Dernière modification : $Date: 2024-12-12 11:55$
* @author Laurent Delineau & JeromeB & Marc-Henri PAMISEU & Yan Naessens
* @copyright Copyright 2003-2023 Team DEVOME - JeromeB
* @link http://www.gnu.org/licenses/licenses.html
Expand Down Expand Up @@ -45,7 +45,7 @@
$max_booking = -1;
$statut_room = isset($_POST["statut_room"]) ? "0" : "1";
$show_fic_room = isset($_POST["show_fic_room"]) ? "y" : "n";
if (isset($_POST["active_ressource_empruntee"]))
/*if (isset($_POST["active_ressource_empruntee"]))
$active_ressource_empruntee = 'y';
else
{
Expand All @@ -61,7 +61,7 @@
// toutes les reservations sont considerees comme restituee
grr_sql_query("update ".TABLE_PREFIX."_entry set statut_entry = '-' where room_id = '".$room."'");
}

*/
$active_participant = isset($_POST["active_participant"]) ? $_POST["active_participant"] : NULL;
$picture_room = isset($_POST["picture_room"]) ? $_POST["picture_room"] : '';
$comment_room = isset($_POST["comment_room"]) ? $_POST["comment_room"] : NULL;
Expand Down Expand Up @@ -142,6 +142,22 @@
$allow_action_in_past = 'n';
if ($dont_allow_modify == '')
$dont_allow_modify = 'n';
if (isset($_POST["active_cle"]))
$active_cle = 'y';
else
{
$active_cle = 'n';
// toutes les clés sont considerees comme restituees
grr_sql_command("update ".TABLE_PREFIX."_entry set clef = 0 where room_id ='$room'");
}
if (isset($_POST["active_ressource_empruntee"]))
$active_ressource_empruntee = 'y';
else
{
$active_ressource_empruntee = 'n';
// toutes les reservations sont considerees comme restituees
grr_sql_command("update ".TABLE_PREFIX."_entry set statut_entry = '-' where room_id ='$room'");
}
if ((isset($room)) && !((isset($action) && ($action == "duplique_room"))))
{
$sql = "UPDATE ".TABLE_PREFIX."_room SET
Expand Down

0 comments on commit eadc9ea

Please sign in to comment.