From 8f9e409d0e19f84fd11b02fdf11762a0bb00eaef Mon Sep 17 00:00:00 2001 From: mattf Date: Mon, 15 Nov 2021 20:14:40 +0000 Subject: [PATCH] Fix for case-mismatch on pause code statuses for multi-campaign selects git-svn-id: svn://192.168.202.10@3538 3d104415-ff17-0410-8863-d5cf3c621b8a --- www/vicidial/AST_agent_time_detail.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/vicidial/AST_agent_time_detail.php b/www/vicidial/AST_agent_time_detail.php index f4dc6e02..afb73ebe 100644 --- a/www/vicidial/AST_agent_time_detail.php +++ b/www/vicidial/AST_agent_time_detail.php @@ -57,6 +57,7 @@ # 191013-0846 - Fixes for PHP7 # 210318-1558 - Added agent screen visibility stats # 210324-2010 - Added agent visibility stats to HTML graphs +# 211115-1513 - Fix for case-mismatch on pause code statuses for multi-campaign selects # $startMS = microtime(); @@ -1016,7 +1017,7 @@ else $i=0; $status_found=0; while ( ($i < $subs_to_print) and ($status_found < 1) ) { - if ( ($Suser[$m]=="$PCuser[$i]") and ($Sstatus=="$sub_status[$i]") ) + if ( ($Suser[$m]=="$PCuser[$i]") and (preg_match("/^$sub_status[$i]$/i",$Sstatus)) ) { $USERcodePAUSE_MS = sec_convert($PCpause_sec[$i],$TIME_agenttimedetail); if (strlen($USERcodePAUSE_MS)<1) {$USERcodePAUSE_MS='0';} @@ -1263,7 +1264,7 @@ else $i=0; $status_found=0; while ($i < $subs_to_print) { - if ($Sstatus=="$sub_status[$i]") + if (preg_match("/^$sub_status[$i]$/i",$Sstatus)) { $Scalls = ($Scalls + $PCpause_sec[$i]); $status_found++; @@ -1694,6 +1695,7 @@ $stmt="UPDATE vicidial_report_log set run_time='$TOTALrun' where report_log_id=' if ($DB) {echo "|$stmt|\n";} $rslt=mysql_to_mysqli($stmt, $link); +if ($DB > 0) {echo "$TOTALrun\n";} ?>