Update destinations.php

This commit is contained in:
FusionPBX
2017-04-04 23:39:51 -06:00
committed by GitHub
parent 5f15324d1f
commit bccf01cd19
+17 -13
View File
@@ -17,22 +17,26 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
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. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
*/ */
require_once "root.php";
require_once "resources/require.php"; //includes
require_once "resources/check_auth.php"; require_once "root.php";
if (permission_exists('destination_view')) { require_once "resources/require.php";
//access granted require_once "resources/check_auth.php";
}
else { //check permissions
echo "access denied"; if (permission_exists('destination_view')) {
exit; //access granted
} }
else {
echo "access denied";
exit;
}
//add multi-lingual support //add multi-lingual support
$language = new text; $language = new text;
@@ -55,7 +59,7 @@ else {
$sql .= "where "; $sql .= "where ";
} }
} else { } else {
$sql .= "where domain_uuid = '".$domain_uuid."' "; $sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) ";
if (strlen($search) > 0) { if (strlen($search) > 0) {
$sql .= "and "; $sql .= "and ";
} }
@@ -97,7 +101,7 @@ else {
$sql .= " where "; $sql .= " where ";
} }
} else { } else {
$sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) ";
if (strlen($search) > 0) { if (strlen($search) > 0) {
$sql .= " and "; $sql .= " and ";
} }