From b671abbc11ac295c01cc520d3006c9fb97f6bd62 Mon Sep 17 00:00:00 2001
From: Pierre-Lin Bonnemaison <pierre.lin@free.fr>
Date: Sun, 16 Aug 2015 00:51:34 +0200
Subject: [PATCH] =?UTF-8?q?Utilisation=20du=20nouveau=20syst=C3=A8me=20de?=
 =?UTF-8?q?=20model=20sur=20internalConsole?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 controllers/internalConsole.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/controllers/internalConsole.php b/controllers/internalConsole.php
index 990c5ed..e1a1430 100755
--- a/controllers/internalConsole.php
+++ b/controllers/internalConsole.php
@@ -134,7 +134,7 @@
 					$now = new DateTime();
 					$now = $now->format('Y-m-d H:i:s');
 					//On peut maintenant ajouter le SMS
-					$db->createSended($now, $number, $scheduled['content']);
+					$db->insertIntoTable('sendeds', ['at' => $now, 'number' => $number, 'content' => $scheduled['content']]);
 					$id_sended = $db->lastId();
 					
 					//Commande qui envoie le SMS
@@ -254,7 +254,7 @@
 				$send_by = $number;
 				$content = $text;
 				$is_command = count($found_commands);
-				if (!$db->createReceived($date, $send_by, $content, $is_command))
+				if (!$db->insertIntoTable('receiveds', ['at' => $date, 'send_by' => $send_by, 'content' => $content, 'is_command' => $is_command]))
 				{
 					echo "Erreur lors de l'enregistrement du SMS\n";
 					$this->wlog('Unable to process the SMS in file "' . $dir);