From d9eedf4bd1513d6d02fde8716d865310c2918ce3 Mon Sep 17 00:00:00 2001 From: jbousquie Date: Thu, 24 Nov 2016 14:00:16 +0100 Subject: [PATCH] appel GetURL() --- admin/reload_ma_salle.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/admin/reload_ma_salle.php b/admin/reload_ma_salle.php index 64b5d7a..68ea62d 100644 --- a/admin/reload_ma_salle.php +++ b/admin/reload_ma_salle.php @@ -6,16 +6,9 @@ require_once 'HTTP/Request2.php'; // Fonction de récupération de la liste des salles bloquées sur SquidGuard Function Get_salles_bloquees($url) { $salles_bloquees = array(); - $r = new HTTP_Request2($url, HTTP_Request2::METHOD_GET); - try { - $response = $r->send(); - if (200 == $response->getStatus()) { - $body = $response->getBody(); - $salles_bloquees = json_decode($body); - } - } - catch (HTTP_Request2_Exception $ex) { - echo $ex->getMessage(); + $res = GetURL($url); + if ($res != "") { + $salles_bloquees = json_decode($res); } return $salles_bloquees; };