From 44fa591991e99056fc931ba9b292a3f6151e2bdc Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Tue, 18 Dec 2012 14:15:38 +0000 Subject: [PATCH] Remove caller id prefix from follow me. --- app/calls/app_languages.php | 4 +-- app/calls/call_edit.php | 26 +++++++++---------- .../resources/classes/switch_follow_me.php | 16 ++++++------ app/follow_me/app_config.php | 8 +++--- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/app/calls/app_languages.php b/app/calls/app_languages.php index 3316707d96..d5a360baee 100644 --- a/app/calls/app_languages.php +++ b/app/calls/app_languages.php @@ -48,8 +48,8 @@ $text['label-ring-5']['en-us'] = 'Ring 5th Number'; $text['label-ring-5']['pt-pt'] = '5º Número a Tocar'; - $text['label-cid-prefix']['en-us'] = 'CID Prefix'; - $text['label-cid-prefix']['pt-pt'] = ''; + //$text['label-cid-prefix']['en-us'] = 'CID Prefix'; + //$text['label-cid-prefix']['pt-pt'] = ''; $text['description-cid-prefix']['en-us'] = 'Set the caller ID name prefix.'; $text['description-cid-prefix']['pt-pt'] = ''; diff --git a/app/calls/call_edit.php b/app/calls/call_edit.php index 6794cb88aa..87cd86dd7d 100644 --- a/app/calls/call_edit.php +++ b/app/calls/call_edit.php @@ -117,7 +117,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if (count($_POST)>0) { $forward_all_enabled = check_str($_POST["forward_all_enabled"]); $forward_all_destination = check_str($_POST["forward_all_destination"]); - $cid_name_prefix = check_str($_POST["cid_name_prefix"]); + //$cid_name_prefix = check_str($_POST["cid_name_prefix"]); $call_prompt = check_str($_POST["call_prompt"]); $follow_me_enabled = check_str($_POST["follow_me_enabled"]); @@ -230,7 +230,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $follow_me->domain_name = $_SESSION['domain_name']; $follow_me->extension_uuid = $extension_uuid; $follow_me->db_type = $db_type; - $follow_me->cid_name_prefix = $cid_name_prefix; + //$follow_me->cid_name_prefix = $cid_name_prefix; $follow_me->call_prompt = $call_prompt; $follow_me->follow_me_enabled = $follow_me_enabled; @@ -317,7 +317,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result as &$row) { - $cid_name_prefix = $row["cid_name_prefix"]; + //$cid_name_prefix = $row["cid_name_prefix"]; $call_prompt = $row["call_prompt"]; $follow_me_enabled = $row["follow_me_enabled"]; @@ -576,16 +576,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; - echo " ".$text['label-cid-prefix'].":\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-cid-prefix']." \n"; - echo "\n"; - echo "\n"; + //echo "\n"; + //echo "\n"; + //echo " ".$text['label-cid-prefix'].":\n"; + //echo "\n"; + //echo "\n"; + //echo " \n"; + //echo "
\n"; + //echo $text['description-cid-prefix']." \n"; + //echo "\n"; + //echo "\n"; echo "\n"; echo "\n"; diff --git a/app/calls/resources/classes/switch_follow_me.php b/app/calls/resources/classes/switch_follow_me.php index a35016638a..0f9466c0c6 100644 --- a/app/calls/resources/classes/switch_follow_me.php +++ b/app/calls/resources/classes/switch_follow_me.php @@ -30,7 +30,7 @@ include "root.php"; public $domain_uuid; public $db_type; public $follow_me_uuid; - public $cid_name_prefix; + //public $cid_name_prefix; public $call_prompt; public $follow_me_enabled; private $extension; @@ -73,7 +73,7 @@ include "root.php"; $sql .= "("; $sql .= "domain_uuid, "; $sql .= "follow_me_uuid, "; - $sql .= "cid_name_prefix, "; + //$sql .= "cid_name_prefix, "; $sql .= "call_prompt, "; $sql .= "follow_me_enabled "; $sql .= ")"; @@ -81,7 +81,7 @@ include "root.php"; $sql .= "("; $sql .= "'$this->domain_uuid', "; $sql .= "'$this->follow_me_uuid', "; - $sql .= "'$this->cid_name_prefix', "; + //$sql .= "'$this->cid_name_prefix', "; $sql .= "'$this->call_prompt', "; $sql .= "'$this->follow_me_enabled' "; $sql .= ")"; @@ -99,7 +99,7 @@ include "root.php"; //update follow me table $sql = "update v_follow_me set "; $sql .= "follow_me_enabled = '$this->follow_me_enabled', "; - $sql .= "cid_name_prefix = '$this->cid_name_prefix', "; + //$sql .= "cid_name_prefix = '$this->cid_name_prefix', "; $sql .= "call_prompt = '$this->call_prompt' "; $sql .= "where domain_uuid = '$this->domain_uuid' "; $sql .= "and follow_me_uuid = '$this->follow_me_uuid' "; @@ -270,7 +270,7 @@ include "root.php"; $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); if (count($result) > 0) { foreach ($result as &$row) { - $cid_name_prefix = $row["cid_name_prefix"]; + //$cid_name_prefix = $row["cid_name_prefix"]; $call_prompt = $row["call_prompt"]; if ($this->follow_me_enabled == "false" && $row["follow_me_enabled"] == "true") { $this->dial_string_update = true; @@ -294,9 +294,9 @@ include "root.php"; if ($this->call_prompt == "true") { $dial_string .= ",call_prompt=true"; } - if (strlen($this->cid_name_prefix) > 0) { - $dial_string .= ",cid_name_prefix=".$this->cid_name_prefix; - } + //if (strlen($this->cid_name_prefix) > 0) { + // $dial_string .= ",effective_caller_id_name=".$this->cid_name_prefix."#123"; + //} $dial_string .= "}"; foreach ($result as &$row) { $dial_string .= "[presence_id=".$row["follow_me_destination"]."@".$_SESSION['domain_name'].","; diff --git a/app/follow_me/app_config.php b/app/follow_me/app_config.php index ebe468d422..9a7c438cb3 100644 --- a/app/follow_me/app_config.php +++ b/app/follow_me/app_config.php @@ -74,10 +74,10 @@ $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)'; $apps[$x]['db'][$y]['fields'][$z]['key'] = 'primary'; $z++; - $apps[$x]['db'][$y]['fields'][$z]['name'] = 'cid_name_prefix'; - $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; - $apps[$x]['db'][$y]['fields'][$z]['description']['en'] = ''; - $z++; + //$apps[$x]['db'][$y]['fields'][$z]['name'] = 'cid_name_prefix'; + //$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; + //$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = ''; + //$z++; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_prompt'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';