From fd25949636969ba3eb5f26472b5bc1c9a00d28f8 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@enhancesoft.com>
Date: Sat, 19 Oct 2013 20:51:54 +0000
Subject: [PATCH] Remove phone_ext - phone field is overloaded with X123 as the
 extension.

---
 include/class.api.php | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/class.api.php b/include/class.api.php
index 418b8da76..1b78b5aec 100644
--- a/include/class.api.php
+++ b/include/class.api.php
@@ -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") {
-- 
GitLab