From a42f6d7d28772a876e83f4bc95ff10c074071179 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Thu, 9 Oct 2014 18:28:18 +0200 Subject: [PATCH] Comments --- controller/smscontroller.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controller/smscontroller.php b/controller/smscontroller.php index a5bc506..9627252 100644 --- a/controller/smscontroller.php +++ b/controller/smscontroller.php @@ -115,11 +115,16 @@ class SmsController extends Controller { $messages = array(); + // Contact resolved if ($contactName != "") { $iContacts = $this->app->getInvertedContacts(); $messages = array(); + + // If there is iContacts (this must be) if (isset($iContacts[$contactName])) { $ctPn = count($iContacts[$contactName]); + + // We merge each message list into global messagelist for ($i=0; $i < $ctPn; $i++) { $messages = array_merge($messages, $this->smsMapper->getAllMessagesForPhoneNumber($this->userId, $iContacts[$contactName][$i], $lastDate)