From 2bc085ec1d7f7c9fd70741ccff3d9534905a24af Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 17 Dec 2014 09:33:18 +0000 Subject: [PATCH] Fix the dial_string remove the extra comma. --- app/calls/resources/classes/follow_me.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/calls/resources/classes/follow_me.php b/app/calls/resources/classes/follow_me.php index db7f455dee..fccaa33796 100644 --- a/app/calls/resources/classes/follow_me.php +++ b/app/calls/resources/classes/follow_me.php @@ -343,8 +343,12 @@ include "root.php"; $dial_string .= ",accountcode=".$this->accountcode; } $dial_string .= "}"; + $x = 0; foreach ($result as &$row) { - $dial_string .= ",["; + if ($x > 0) { + $dial_string .= ","; + } + $dial_string .= "["; if (extension_exists($row["follow_me_destination"])) { //set the dial string if (strlen($_SESSION['domain']['dial_string']['text']) == 0) { @@ -393,6 +397,7 @@ include "root.php"; $dial_string .= $row["follow_me_destination"]; } } + $x++; } $this->dial_string = $dial_string; }