Fix the dial_string remove the extra comma.

This commit is contained in:
Mark Crane 2014-12-17 09:33:18 +00:00
parent 36d2d9d400
commit 2bc085ec1d
1 changed files with 6 additions and 1 deletions

View File

@ -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;
}