From 581f7572bc478c8eaac6d75dc19e7a4220e80b2f Mon Sep 17 00:00:00 2001 From: Machou Date: Fri, 1 Apr 2016 04:40:50 +0200 Subject: [PATCH 1/3] Update console.php remove double ;; --- console.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console.php b/console.php index 2f55be8..be88575 100755 --- a/console.php +++ b/console.php @@ -20,7 +20,7 @@ # MODEL # ######### //On va appeler un modèle, est l'initialiser - $db = new DataBase($bdd);; + $db = new DataBase($bdd); //On va ajouter les réglages globaux de RaspiSMS modifiables via l'interface $settings = $db->getFromTableWhere('settings'); From 159721905cd924e5a950f212e28e724994052033 Mon Sep 17 00:00:00 2001 From: OsaAjani Date: Mon, 23 May 2016 19:18:05 +0200 Subject: [PATCH 2/3] Fix groups et contacts par api --- controllers/smsAPI.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/smsAPI.php b/controllers/smsAPI.php index 1c3b05d..ea0288f 100755 --- a/controllers/smsAPI.php +++ b/controllers/smsAPI.php @@ -79,6 +79,7 @@ unset($contacts[$key]); continue; } + $contact = $contact[0]; $contacts[$key] = $contact['id']; } @@ -86,11 +87,12 @@ //Pour chaque groupe, on récupère l'id du groupe foreach ($groups as $key => $name) { - if ($group = $db->getFromTableWhere('groups', ['name' => $name])) + if (!$group = $db->getFromTableWhere('groups', ['name' => $name])) { unset($groups[$key]); continue; } + $group = $group[0]; $groups[$key] = $group['id']; } From cdedb023d7eb04e5fd9fe6ffeb6d0365b48a34dd Mon Sep 17 00:00:00 2001 From: OsaAjani Date: Mon, 23 May 2016 19:29:27 +0200 Subject: [PATCH 3/3] Fix contacts et groups sur l'api --- controllers/smsAPI.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/smsAPI.php b/controllers/smsAPI.php index ea0288f..cb4f94f 100755 --- a/controllers/smsAPI.php +++ b/controllers/smsAPI.php @@ -79,8 +79,8 @@ unset($contacts[$key]); continue; } - $contact = $contact[0]; + $contact = $contact[0]; $contacts[$key] = $contact['id']; } @@ -92,8 +92,8 @@ unset($groups[$key]); continue; } - $group = $group[0]; + $group = $group[0]; $groups[$key] = $group['id']; }