From be812fd1ec1a1586c606ad6874635edec1502787 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 26 Sep 2020 12:13:47 -0600 Subject: [PATCH] Move the permission check to its own if statement. --- app/conferences/conference_edit.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/conferences/conference_edit.php b/app/conferences/conference_edit.php index e7ebc033d7..45d60e7d59 100644 --- a/app/conferences/conference_edit.php +++ b/app/conferences/conference_edit.php @@ -324,9 +324,15 @@ echo " ".$text['title-conference'].""; echo " \n"; echo "
\n"; + echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'conferences.php']); - if ($action == 'update' && permission_exists('conference_active_view')) { - echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'style'=>'margin-right: 15px;','link'=>'../conferences_active/conferences_active.php?c='.urlencode(str_replace(' ', '-', $conference_name))]); + if ($action == 'update') { + if (permission_exists('conference_cdr_view')) { + echo button::create(['type'=>'button','label'=>$text['button-cdr'],'icon'=>'list','link'=>PROJECT_PATH.'/app/conference_cdr/conference_cdr.php?id='.urlencode($conference_uuid)]); + } + if (permission_exists('conference_active_view')) { + echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'style'=>'','link'=>'../conferences_active/conferences_active.php?c='.urlencode(str_replace(' ', '-', $conference_name))]); + } } echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']); echo "
\n";