mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Don't filter LOSE_RACE of already filtering originating_leg_uuid
It is redundant to filter out LOSE_RACE when originating_leg_uuid is also filtered, there is an overlap where every call with LOSE_RACE also has an originating_leg.
This commit is contained in:
@@ -280,14 +280,14 @@
|
||||
$sql_where_ands[] = "leg = :leg";
|
||||
$parameters['leg'] = $leg;
|
||||
}
|
||||
//If you can't see lose_race, don't run stats on it
|
||||
if (!permission_exists('xml_cdr_lose_race')) {
|
||||
$sql_where_ands[] = "hangup_cause != 'LOSE_RACE'";
|
||||
}
|
||||
//Exclude enterprise ring group legs
|
||||
if (!permission_exists('xml_cdr_enterprise_leg')) {
|
||||
$sql_where_ands[] .= "originating_leg_uuid IS NULL";
|
||||
}
|
||||
//If you can't see lose_race, don't run stats on it
|
||||
elseif (!permission_exists('xml_cdr_lose_race')) {
|
||||
$sql_where_ands[] = "hangup_cause != 'LOSE_RACE'";
|
||||
}
|
||||
|
||||
|
||||
//if not admin or superadmin, only show own calls
|
||||
|
||||
Reference in New Issue
Block a user