1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-07 16:06:15 +00:00

First step for debugging non spaces with spaces numbers

This commit is contained in:
Loic Blot 2014-10-23 05:55:16 +00:00
parent c256ca5132
commit 1e21406f76
2 changed files with 3 additions and 0 deletions

View File

@ -96,7 +96,9 @@ class SmsController extends Controller {
foreach ($phoneList as $number => $ts) { foreach ($phoneList as $number => $ts) {
$fmtPN = preg_replace("#[ ]#","/", $number); $fmtPN = preg_replace("#[ ]#","/", $number);
if (isset($contactsSrc[$fmtPN])) { if (isset($contactsSrc[$fmtPN])) {
$fmtPN2 = preg_replace("#\/#","", $fmtPN);
$contacts[$fmtPN] = $contactsSrc[$fmtPN]; $contacts[$fmtPN] = $contactsSrc[$fmtPN];
$contacts[$fmtPN2] = $contactsSrc[$fmtPN];
} }
} }

View File

@ -199,6 +199,7 @@ function fetchInitialPeerList(jsondata) {
$.each(jsondata['phonelist'], function(id, val) { $.each(jsondata['phonelist'], function(id, val) {
var fn, peerLabel, idxVal; var fn, peerLabel, idxVal;
idxVal = id.replace(/\//g,' '); idxVal = id.replace(/\//g,' ');
idxVal2 = idxVal.replace('/ /g','');
if (typeof jsondata['contacts'][id] == 'undefined') { if (typeof jsondata['contacts'][id] == 'undefined') {
fn = ''; fn = '';
peerLabel = id; peerLabel = id;