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
No related branches found
No related tags found
No related merge requests found
...@@ -318,8 +318,6 @@ class ApiXmlDataParser extends XmlDataParser { ...@@ -318,8 +318,6 @@ class ApiXmlDataParser extends XmlDataParser {
return $current; return $current;
foreach ($current as $key=>&$value) { foreach ($current as $key=>&$value) {
if ($key == "phone" && is_array($value)) { if ($key == "phone" && is_array($value)) {
if (isset($value['ext']))
$current["phone_ext"] = $value["ext"]; # PHP [like] point
$value = $value[":text"]; $value = $value[":text"];
} else if ($key == "alert") { } else if ($key == "alert") {
$value = (bool)$value; $value = (bool)$value;
...@@ -356,8 +354,7 @@ class ApiJsonDataParser extends JsonDataParser { ...@@ -356,8 +354,7 @@ class ApiJsonDataParser extends JsonDataParser {
return $current; return $current;
foreach ($current as $key=>&$value) { foreach ($current as $key=>&$value) {
if ($key == "phone") { if ($key == "phone") {
list($value, $current["phone_ext"]) $value = strtoupper($value);
= explode("X", strtoupper($value), 2);
} else if ($key == "alert") { } else if ($key == "alert") {
$value = (bool)$value; $value = (bool)$value;
} else if ($key == "autorespond") { } 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