From 1e21406f768f3453ef8b46d7ae99b45242c7b9fc Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Thu, 23 Oct 2014 05:55:16 +0000 Subject: [PATCH] First step for debugging non spaces with spaces numbers --- controller/smscontroller.php | 2 ++ js/script.js | 1 + 2 files changed, 3 insertions(+) diff --git a/controller/smscontroller.php b/controller/smscontroller.php index 742edc1..42821bd 100644 --- a/controller/smscontroller.php +++ b/controller/smscontroller.php @@ -96,7 +96,9 @@ class SmsController extends Controller { foreach ($phoneList as $number => $ts) { $fmtPN = preg_replace("#[ ]#","/", $number); if (isset($contactsSrc[$fmtPN])) { + $fmtPN2 = preg_replace("#\/#","", $fmtPN); $contacts[$fmtPN] = $contactsSrc[$fmtPN]; + $contacts[$fmtPN2] = $contactsSrc[$fmtPN]; } } diff --git a/js/script.js b/js/script.js index f8ee1a3..bf11727 100644 --- a/js/script.js +++ b/js/script.js @@ -199,6 +199,7 @@ function fetchInitialPeerList(jsondata) { $.each(jsondata['phonelist'], function(id, val) { var fn, peerLabel, idxVal; idxVal = id.replace(/\//g,' '); + idxVal2 = idxVal.replace('/ /g',''); if (typeof jsondata['contacts'][id] == 'undefined') { fn = ''; peerLabel = id;