Update ivr_menus.php fix show all

This commit is contained in:
FusionPBX 2023-05-18 09:28:42 -06:00 committed by GitHub
parent 9a97c44952
commit f09b7a699f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 6 deletions

View File

@ -98,9 +98,11 @@
//prepare to page the results
$sql = "select count(*) from v_ivr_menus ";
$sql .= "where true ";
if (!empty($show) && $show != "all" || !permission_exists('ivr_menu_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
if ($show == "all" && permission_exists('ivr_menu_all')) {
$sql .= "where true ";
}
else {
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (!empty($search)) {
@ -129,9 +131,11 @@
//get the list
$sql = "select * from v_ivr_menus ";
$sql .= "where true ";
if (!empty($show) && $show != "all" || !permission_exists('ivr_menu_all')) {
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
if ($show == "all" && permission_exists('ivr_menu_all')) {
$sql .= "where true ";
}
else {
$sql .= "where (domain_uuid = :domain_uuid or domain_uuid is null) ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (!empty($search)) {