mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update gateway_edit.php
If permission to view all gateways then add an 'or domain_uuid is null'
This commit is contained in:
@@ -50,7 +50,12 @@ else {
|
||||
//get total gateway count from the database, check limit, if defined
|
||||
if ($action == 'add') {
|
||||
if ($_SESSION['limit']['gateways']['numeric'] != '') {
|
||||
$sql = "select count(*) as num_rows from v_gateways where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
$sql = "select count(*) as num_rows from v_gateways ";
|
||||
$sql .= "where ( domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
if (permission_exists('gateway_domain') {
|
||||
$sql .= "or domain_uuid is null ";
|
||||
}
|
||||
$sql .= ");";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
@@ -961,4 +966,4 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user