Fix xml cdr for PHP 8.1 (#6692)
* fix multiple warnings * fix multiple warnings * ensure array key exists * ensure array key exists * assign boolean variable for showall in url * change boolean to show_all instead of showall * revert some changes. Create default leg value and mos_score * validate page integer * revert back to showall from get
This commit is contained in:
@@ -46,6 +46,9 @@
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//set default showall
|
||||
$show_all = false;
|
||||
|
||||
//additional includes
|
||||
$document['title'] = $text['title-call-statistics'];
|
||||
require_once "resources/header.php";
|
||||
@@ -55,8 +58,9 @@
|
||||
if (permission_exists('xml_cdr_search_advanced')) {
|
||||
$search_url .= '&redirect=xml_cdr_statistics';
|
||||
}
|
||||
if(permission_exists('xml_cdr_all') && ($_GET['showall'] === 'true')){
|
||||
if(permission_exists('xml_cdr_all') && (isset($_GET['showall']) && $_GET['showall'] === 'true')){
|
||||
$search_url .= '&showall=true';
|
||||
$show_all = true;
|
||||
}
|
||||
if (!empty($_GET['direction'])) {
|
||||
$search_url .= '&direction='.urlencode($_GET['direction']);
|
||||
@@ -144,7 +148,7 @@
|
||||
if (permission_exists('xml_cdr_search_advanced')) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-advanced_search'],'icon'=>'tools','link'=>'xml_cdr_search.php?type=advanced'.$search_url]);
|
||||
}
|
||||
if (permission_exists('xml_cdr_all') && $_GET['showall'] != 'true') {
|
||||
if (permission_exists('xml_cdr_all') && !$show_all) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$_SESSION['theme']['button_icon_all'],'link'=>'xml_cdr_statistics.php?showall=true'.$search_url]);
|
||||
}
|
||||
echo button::create(['type'=>'button','label'=>$text['button-extension_summary'],'icon'=>'list','link'=>'xml_cdr_extension_summary.php']);
|
||||
|
||||
Reference in New Issue
Block a user