diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index 03b55ee5f0..33ee43aeda 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -157,6 +157,27 @@ $destinations = $prep_statement->fetchAll(PDO::FETCH_NAMED); unset ($prep_statement, $sql); +//get the destination select list + $destination = new destinations; + $destination_array = $destination->all('dialplan'); + +//add a function to return the action_name + function action_name($destination_array, $detail_action) { + foreach($destination_array as $group => $row) { + foreach ($row as $key => $value) { + if ($value == $detail_action) { + //add multi-lingual support + if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$group."/app_languages.php")) { + $language2 = new text; + $text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$group); + } + //return the group and destination name + return trim($text2['title-'.$group].' '.$key); + } + } + } + } + //alternate the row style $c = 0; $row_style["0"] = "row_style0"; @@ -226,6 +247,7 @@ } echo th_order_by('destination_type', $text['label-destination_type'], $order_by, $order, $param); echo th_order_by('destination_number', $text['label-destination_number'], $order_by, $order, $param); + echo "