From 2aae2e9714a6f71fa7e64572d9e22207384b2381 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 17 Dec 2014 11:33:31 +0000 Subject: [PATCH] Fix Dialplan Destination so that it won't fail if fax app is not installed. --- app/destinations/destination_edit.php | 52 ++++++++++++++------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index 26e65995d5..481bf7fa69 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -637,33 +637,35 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; - echo " ".$text['label-fax_uuid'].":\n"; - echo "\n"; - echo "\n"; - $sql = "select * from v_fax "; - $sql .= "where domain_uuid = '".$_SESSION["domain_uuid"]."' "; - $sql .= "order by fax_name asc "; - $prep_statement = $db->prepare(check_sql($sql)); - $prep_statement->execute(); - $result = $prep_statement->fetchAll(PDO::FETCH_ASSOC); - echo " \n"; + echo " \n"; + foreach ($result as &$row) { + if ($row["fax_uuid"] == $fax_uuid) { + echo " \n"; + } + else { + echo " \n"; + } } + echo " \n"; + unset ($prep_statement, $extension); + echo "
\n"; + echo " ".$text['description-fax_uuid']."\n"; + echo "\n"; + echo "\n"; } - echo " \n"; - unset ($prep_statement, $extension); - echo "
\n"; - echo " ".$text['description-fax_uuid']."\n"; - echo "\n"; - echo "\n"; echo "\n"; echo "\n";