From 3a965a2800751330e49248ef28bb682b97c1eefa Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sun, 24 Aug 2014 07:53:54 +0000 Subject: [PATCH] Remove this code that set the dialplan_number as it is no longer needed because of the xml number attribute that was added to the dialplan --- app/dialplan/dialplans.php | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/app/dialplan/dialplans.php b/app/dialplan/dialplans.php index d5749ed452..fd8ed4df16 100644 --- a/app/dialplan/dialplans.php +++ b/app/dialplan/dialplans.php @@ -269,31 +269,6 @@ else { if ($result_count > 0) { foreach($result as $row) { $app_uuid = $row['app_uuid']; - if (strlen($row['dialplan_number']) == 0) { - $sql = "select * from v_dialplan_details "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and dialplan_uuid = '".$row['dialplan_uuid']."' "; - $sql .= "and dialplan_detail_type = 'destination_number' "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $tmp_result = $prep_statement->fetchAll(PDO::FETCH_NAMED); - foreach ($tmp_result as &$tmp) { - //prepare the extension number - preg_match_all('/[\|0-9\*]/',$tmp["dialplan_detail_data"], $tmp_match); - $dialplan_number = implode("",$tmp_match[0]); - $dialplan_number = str_replace("|", " ", $dialplan_number); - $row['dialplan_number'] = $dialplan_number; - //update the extension number - $sql = "update v_dialplans set "; - $sql .= "dialplan_number = '$dialplan_number' "; - $sql .= "where domain_uuid = '$domain_uuid' "; - $sql .= "and dialplan_uuid = '".$row['dialplan_uuid']."'"; - $db->exec($sql); - unset($sql); - break; //limit to 1 row - } - unset ($prep_statement); - } // blank app id if doesn't match others, so will return to dialplan manager switch ($app_uuid) {