Re-add permission check for xml_cdr_lose_race and xml_cdr_enterprise_leg.
This commit is contained in:
parent
2050d98e3e
commit
9e77266299
|
|
@ -1046,7 +1046,12 @@ if (!class_exists('xml_cdr')) {
|
|||
$sql .= "count(*) \n";
|
||||
$sql .= "filter ( \n";
|
||||
$sql .= " where c.extension_uuid = e.extension_uuid \n";
|
||||
$sql .= " and hangup_cause != 'LOSE_RACE' \n";
|
||||
if (!permission_exists('xml_cdr_enterprise_leg')) {
|
||||
$sql .= " and originating_leg_uuid is null \n";
|
||||
}
|
||||
elseif (!permission_exists('xml_cdr_lose_race')) {
|
||||
$sql .= " and hangup_cause <> 'LOSE_RACE' \n";
|
||||
}
|
||||
$sql .= " and originating_leg_uuid IS NULL \n";
|
||||
$sql .= " and (answer_stamp IS NOT NULL and bridge_uuid IS NOT NULL) \n";
|
||||
$sql .= " and (cc_side IS NULL or cc_side !='agent')";
|
||||
|
|
@ -1063,7 +1068,12 @@ if (!class_exists('xml_cdr')) {
|
|||
$sql .= "count(*) \n";
|
||||
$sql .= "filter ( \n";
|
||||
$sql .= " where c.extension_uuid = e.extension_uuid \n";
|
||||
$sql .= " and hangup_cause != 'LOSE_RACE' \n";
|
||||
if (!permission_exists('xml_cdr_enterprise_leg')) {
|
||||
$sql .= " and originating_leg_uuid is null \n";
|
||||
}
|
||||
elseif (!permission_exists('xml_cdr_lose_race')) {
|
||||
$sql .= " and hangup_cause <> 'LOSE_RACE' \n";
|
||||
}
|
||||
$sql .= " and originating_leg_uuid IS NULL \n";
|
||||
|
||||
$sql .= " and ( \n";
|
||||
|
|
@ -1141,7 +1151,12 @@ if (!class_exists('xml_cdr')) {
|
|||
$sql .= "count(*) \n";
|
||||
$sql .= "filter ( \n";
|
||||
$sql .= " where c.extension_uuid = e.extension_uuid \n";
|
||||
$sql .= " and hangup_cause != 'LOSE_RACE' \n";
|
||||
if (!permission_exists('xml_cdr_enterprise_leg')) {
|
||||
$sql .= " and originating_leg_uuid is null \n";
|
||||
}
|
||||
elseif (!permission_exists('xml_cdr_lose_race')) {
|
||||
$sql .= " and hangup_cause <> 'LOSE_RACE' \n";
|
||||
}
|
||||
$sql .= " and originating_leg_uuid IS NULL \n";
|
||||
$sql .= " and (cc_side is null or cc_side != 'agent') \n";
|
||||
if ($this->include_internal) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue