From 467892fa3516642964d0192c2b394655576df9bb Mon Sep 17 00:00:00 2001 From: Yohann Date: Thu, 3 Oct 2019 01:38:37 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20d'un=20bug=20emp=C3=AAchant=20l'af?= =?UTF-8?q?fichage=20des=20autorisations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server_files/controllers/mon_equipe.php | 4 +++- server_files/controllers/view_file.php | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server_files/controllers/mon_equipe.php b/server_files/controllers/mon_equipe.php index c4613b4..8469ab4 100644 --- a/server_files/controllers/mon_equipe.php +++ b/server_files/controllers/mon_equipe.php @@ -137,12 +137,14 @@ class MyTeam public function updateTeam() { - global $URL_BASE; + global $DB, $URL_BASE; $this->team->setName($this->name); $this->team->setTrigram($this->trigram); $this->team->setProblem($this->problem); + $DB->exec("UPDATE `teams` SET `problem` = " . $this->problem . " WHERE `id` = " . $this->team->getId() . ";"); + header("Location: $URL_BASE/mon-equipe"); } } diff --git a/server_files/controllers/view_file.php b/server_files/controllers/view_file.php index 17cc264..c238043 100644 --- a/server_files/controllers/view_file.php +++ b/server_files/controllers/view_file.php @@ -17,7 +17,6 @@ if ($file !== null) { $trigram = $team->getTrigram(); $user = User::fromId($file->getUserId()); - $type = $file->getType(); if (($_SESSION["role"] == Role::PARTICIPANT || $_SESSION["role"] == Role::ENCADRANT) && $user->getId() != $_SESSION["user_id"]) require_once "server_files/403.php";