From 716e58fcf6cd8bf1b6bef3f0ea3506712280104d Mon Sep 17 00:00:00 2001 From: mattf Date: Sun, 30 Oct 2016 12:36:48 +0000 Subject: [PATCH] Fixed excess load in user_stats.php Issue #963 git-svn-id: svn://192.168.202.10@2605 3d104415-ff17-0410-8863-d5cf3c621b8a --- www/vicidial/user_stats.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/vicidial/user_stats.php b/www/vicidial/user_stats.php index ede5bc94..484763f2 100644 --- a/www/vicidial/user_stats.php +++ b/www/vicidial/user_stats.php @@ -52,6 +52,7 @@ # 160112-0759 - Added link to direct to recording logging page # 160325-1430 - Changes for sidebar update # 160508-0807 - Added colors features +# 161030-0829 - Fixed excess load Issue #963 # $startMS = microtime(); @@ -1516,8 +1517,9 @@ else $row[4] = preg_replace("/SELECT count\(\*\) from vicidial_list where/",'',$row[4]); $row[4] = preg_replace('/SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner from vicidial_list where /','',$row[4]); - while (strlen($row[4]) > 100) - {$row[4] = preg_replace("/.$/",'',$row[4]);} + if (strlen($row[4]) > 100) + {$row[4] = substr($row[4], 0, 100);} + $u++; $MAIN.=""; $MAIN.="$u";