From 5b66aa1aa7ace460c75d8b12f4044a3c8f792f09 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 18 Sep 2024 11:53:42 -0600 Subject: [PATCH] Show only default extension type Hide virtual extensions --- .../resources/dashboard/registrations.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/registrations/resources/dashboard/registrations.php b/app/registrations/resources/dashboard/registrations.php index f944f57d34..67e163db79 100644 --- a/app/registrations/resources/dashboard/registrations.php +++ b/app/registrations/resources/dashboard/registrations.php @@ -37,9 +37,12 @@ //get the total enabled extensions $sql = "select count(*) as count from v_extensions "; - $sql .= "where domain_uuid = :domain_uuid "; - $sql .= "and enabled = 'true'; "; - $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + $sql .= "where enabled = 'true' "; + if (!permission_exists("registration_all")) { + $sql .= "and domain_uuid = :domain_uuid "; + $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + } + $sql .= "and extension_type = 'default'; "; $row = $database->select($sql, $parameters, 'row'); $enabled_extensions = $row['count']; unset($sql, $row); @@ -62,4 +65,4 @@ echo " "; echo "\n"; -?> \ No newline at end of file +?>