From 6c8834250cb0d9a9acc6a31e36e78289db6d8011 Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 7 Dec 2023 20:03:32 +0000 Subject: [PATCH] Fix for web_loader_phone_strip duplicate check, issue #1498 Changed lead loader 5th gen to set Custom layout as default git-svn-id: svn://192.168.202.10@3790 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../agc_2.0.4/extras/phone_codes_GMT.txt | 2 ++ .../vicidial/admin_listloader_fifth_gen.php | 18 +++++----- .../vicidial/admin_listloader_fourth_gen.php | 34 ++++++++++--------- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/agc_2-X/branches/agc_2.0.4/extras/phone_codes_GMT.txt b/agc_2-X/branches/agc_2.0.4/extras/phone_codes_GMT.txt index c62dd7a8..15f5832b 100644 --- a/agc_2-X/branches/agc_2.0.4/extras/phone_codes_GMT.txt +++ b/agc_2-X/branches/agc_2.0.4/extras/phone_codes_GMT.txt @@ -242,6 +242,7 @@ code country areacode state GMT DST DST_RANGE GEOGRAPHIC DESCRIPTION TZ_CODE PHP 1 USA 618 IL -6 Y SSM-FSN Illinois CST America/Chicago 1 USA 619 CA -8 Y SSM-FSN California PST America/Los_Angeles 1 USA 620 KS -6 Y SSM-FSN Kansas CST America/Chicago +1 USA 621 TX -6 Y SSM-FSN Texas CST America/Chicago 1 USA 623 AZ -7 N Arizona MST America/Phoenix 1 USA 624 NY -5 Y SSM-FSN New York EST America/New_York 1 USA 626 CA -8 Y SSM-FSN California PST America/Los_Angeles @@ -372,6 +373,7 @@ code country areacode state GMT DST DST_RANGE GEOGRAPHIC DESCRIPTION TZ_CODE PHP 1 USA 831 CA -8 Y SSM-FSN California PST America/Los_Angeles 1 USA 832 TX -6 Y SSM-FSN Texas CST America/Chicago 1 USA 835 PA -5 Y SSM-FSN Pennsylvania EST America/New_York +1 USA 837 CA -8 Y SSM-FSN California PST America/Los_Angeles 1 USA 838 NY -5 Y SSM-FSN New York EST America/New_York 1 USA 839 SC -5 Y SSM-FSN South Carolina EST America/New_York 1 USA 840 CA -8 Y SSM-FSN California PST America/Los_Angeles diff --git a/agc_2-X/trunk/www/vicidial/admin_listloader_fifth_gen.php b/agc_2-X/trunk/www/vicidial/admin_listloader_fifth_gen.php index 5ae1d0af..d7c21d7d 100644 --- a/agc_2-X/trunk/www/vicidial/admin_listloader_fifth_gen.php +++ b/agc_2-X/trunk/www/vicidial/admin_listloader_fifth_gen.php @@ -81,10 +81,11 @@ # 210210-1602 - Added duplicate check with more X-day options # 220222-1002 - Added allow_web_debug system setting # 230210-1844 - Added invalid_phone_override option +# 231207-1446 - Fix for web_loader_phone_strip duplicate check, issue #1498, also changed format to "Custom layout" default # -$version = '2.14-79'; -$build = '230210-1844'; +$version = '2.14-80'; +$build = '231207-1446'; require("dbconnect_mysqli.php"); require("functions.php"); @@ -765,7 +766,7 @@ if ( (!$OK_to_process) or ( ($leadfile) and ($file_layout!="standard" && $file_l : -          +          : @@ -957,7 +958,7 @@ if ($SSenable_international_dncs) " name='submit_file'>        " name='reload_page'> -             -     :     :     +             |     :     :     0) and ($SSweb_loader_phone_strip != 'DISABLED') ) + { + $phone_number = preg_replace("/^$SSweb_loader_phone_strip/",'',$phone_number); + } + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### if (preg_match("/DUPCAMP/i",$dupcheck)) { @@ -3048,10 +3054,6 @@ function check_lead($DB,$link,$list_id,$phone_number,$alt_phone,$address3,$title } } - if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') ) - { - $phone_number = preg_replace("/^$SSweb_loader_phone_strip/",'',$phone_number); - } if ( (strlen($phone_number)<5) || (strlen($phone_number)>18) ) { $valid_number=0; diff --git a/agc_2-X/trunk/www/vicidial/admin_listloader_fourth_gen.php b/agc_2-X/trunk/www/vicidial/admin_listloader_fourth_gen.php index b97f5cfb..721fc2ae 100644 --- a/agc_2-X/trunk/www/vicidial/admin_listloader_fourth_gen.php +++ b/agc_2-X/trunk/www/vicidial/admin_listloader_fourth_gen.php @@ -2,7 +2,7 @@ # admin_listloader_fourth_gen.php - version 2.14 # (based upon - new_listloader_superL.php script) # -# Copyright (C) 2022 Matt Florell,Joe Johnson LICENSE: AGPLv2 +# Copyright (C) 2023 Matt Florell,Joe Johnson LICENSE: AGPLv2 # # ViciDial web-based lead loader from formatted file # @@ -80,10 +80,11 @@ # 200922-1013 - Added web_loader_phone_strip system setting feature # 210210-1602 - Added duplicate check with more X-day options # 220222-1002 - Added allow_web_debug system setting +# 231207-1445 - Fix for web_loader_phone_strip duplicate check, issue #1498 # -$version = '2.14-78'; -$build = '220222-1002'; +$version = '2.14-79'; +$build = '231207-1445'; require("dbconnect_mysqli.php"); require("functions.php"); @@ -911,7 +912,7 @@ if ($SSenable_international_dncs) " name='submit_file'>        " name='reload_page'> -             -     :     :     +             |     :     :     0) and ($SSweb_loader_phone_strip != 'DISABLED') ) + { + $phone_number = preg_replace("/^$SSweb_loader_phone_strip/",'',$phone_number); + } ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### if (preg_match("/DUPCAMP/i",$dupcheck)) @@ -1572,10 +1577,6 @@ if ($OK_to_process) $valid_number=1; $invalid_reason=''; - if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') ) - { - $phone_number = preg_replace("/^$SSweb_loader_phone_strip/",'',$phone_number); - } if ( (strlen($phone_number)<5) || (strlen($phone_number)>18) ) { $valid_number=0; @@ -2044,6 +2045,10 @@ if (($leadfile) && ($LF_path)) } } + if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') ) + { + $phone_number = preg_replace("/^$SSweb_loader_phone_strip/",'',$phone_number); + } ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### if (preg_match("/DUPCAMP/i",$dupcheck)) @@ -2315,10 +2320,6 @@ if (($leadfile) && ($LF_path)) $valid_number=1; $invalid_reason=''; - if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') ) - { - $phone_number = preg_replace("/^$SSweb_loader_phone_strip/",'',$phone_number); - } if ( (strlen($phone_number)<5) || (strlen($phone_number)>18) ) { $valid_number=0; @@ -2807,6 +2808,11 @@ if (($leadfile) && ($LF_path)) } } + if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') ) + { + $phone_number = preg_replace("/^$SSweb_loader_phone_strip/",'',$phone_number); + } + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### if (preg_match("/DUPCAMP/i",$dupcheck)) { @@ -3078,10 +3084,6 @@ if (($leadfile) && ($LF_path)) $valid_number=1; $dnc_matches=0; $invalid_reason=''; - if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') ) - { - $phone_number = preg_replace("/^$SSweb_loader_phone_strip/",'',$phone_number); - } if ( (strlen($phone_number)<5) || (strlen($phone_number)>18) ) { $valid_number=0;