Skip to content
Snippets Groups Projects
Commit fd259496 authored by Peter Rotich's avatar Peter Rotich
Browse files

Remove phone_ext - phone field is overloaded with X123 as the extension.

parent f281cf49
Branches
Tags
No related merge requests found
......@@ -318,8 +318,6 @@ class ApiXmlDataParser extends XmlDataParser {
return $current;
foreach ($current as $key=>&$value) {
if ($key == "phone" && is_array($value)) {
if (isset($value['ext']))
$current["phone_ext"] = $value["ext"]; # PHP [like] point
$value = $value[":text"];
} else if ($key == "alert") {
$value = (bool)$value;
......@@ -356,8 +354,7 @@ class ApiJsonDataParser extends JsonDataParser {
return $current;
foreach ($current as $key=>&$value) {
if ($key == "phone") {
list($value, $current["phone_ext"])
= explode("X", strtoupper($value), 2);
$value = strtoupper($value);
} else if ($key == "alert") {
$value = (bool)$value;
} else if ($key == "autorespond") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment