From bccf01cd197ae447ccf540f39ba0f72e3d303bdd Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 4 Apr 2017 23:39:51 -0600 Subject: [PATCH] Update destinations.php --- app/destinations/destinations.php | 32 +++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index ed537cce92..94ea25d9f1 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -17,22 +17,26 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2015 + Portions created by the Initial Developer are Copyright (C) 2008-2017 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ -require_once "root.php"; -require_once "resources/require.php"; -require_once "resources/check_auth.php"; -if (permission_exists('destination_view')) { - //access granted -} -else { - echo "access denied"; - exit; -} + +//includes + require_once "root.php"; + require_once "resources/require.php"; + require_once "resources/check_auth.php"; + +//check permissions + if (permission_exists('destination_view')) { + //access granted + } + else { + echo "access denied"; + exit; + } //add multi-lingual support $language = new text; @@ -55,7 +59,7 @@ else { $sql .= "where "; } } else { - $sql .= "where domain_uuid = '".$domain_uuid."' "; + $sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; if (strlen($search) > 0) { $sql .= "and "; } @@ -97,7 +101,7 @@ else { $sql .= " where "; } } else { - $sql .= "where domain_uuid = '$domain_uuid' "; + $sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; if (strlen($search) > 0) { $sql .= " and "; } @@ -225,4 +229,4 @@ else { //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>