Remove unnecessary if statement (#7264)

This commit is contained in:
Alex 2025-02-20 11:33:06 -07:00 committed by GitHub
parent e416e74c30
commit 036731202e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 38 additions and 40 deletions

View File

@ -17,7 +17,7 @@
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) 2018 - 2022 Portions created by the Initial Developer are Copyright (C) 2018-2025
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@ -39,8 +39,7 @@
} }
//change the domain //change the domain
if (!empty($_GET["domain_uuid"]) && is_uuid($_GET["domain_uuid"]) && $_GET["domain_change"] == "true") { if (!empty($_GET["domain_uuid"]) && is_uuid($_GET["domain_uuid"]) && $_GET["domain_change"] == "true" && permission_exists('domain_select')) {
if (permission_exists('domain_select')) {
//update the domain session variables //update the domain session variables
$domain_uuid = $_GET["domain_uuid"]; $domain_uuid = $_GET["domain_uuid"];
@ -85,7 +84,6 @@
} }
exit; exit;
} }
}
//check permission //check permission
if (permission_exists('domain_all') && permission_exists('domain_view')) { if (permission_exists('domain_all') && permission_exists('domain_view')) {