From 1e6578090d376688795503d4b42a058846ea5722 Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 7 Jul 2010 03:41:54 +0000 Subject: [PATCH] Added ability to purge only one campaign's leads in the hopper, issue #349 git-svn-id: svn://192.168.202.10@1474 3d104415-ff17-0410-8863-d5cf3c621b8a --- UPGRADE | 2 +- bin/AST_VDhopper.pl | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/UPGRADE b/UPGRADE index 803baca6..f2d569a6 100644 --- a/UPGRADE +++ b/UPGRADE @@ -185,7 +185,7 @@ OTHER CHANGES: and CSV format(you must set a list ID override and you must select Custom Format). You can also use the non-agent API add_lead function, (see the NON-AGENT_API.txt doc for more info). You can also use the - third gen lead loader to import leads with custom fieles in several + third gen lead loader to import leads with custom files in several other formats. 44. Added more options to agi-AGENT_route.agi to allow it to prompt for user IDs diff --git a/bin/AST_VDhopper.pl b/bin/AST_VDhopper.pl index 99c874b7..ba37dfb9 100644 --- a/bin/AST_VDhopper.pl +++ b/bin/AST_VDhopper.pl @@ -53,6 +53,7 @@ # 100409-1101 - Fix for rare dial-time duplicate hopper load issue # 100427-0429 - Fix for list mix no-status-selected issue # 100529-0843 - Changed dialable leads to calculate every run for active campaigns +# 100706-2332 - Added ability to purge only one campaign's leads in the hopper # # constants @@ -292,7 +293,14 @@ if ($DB) {print "TIME DEBUG: $LOCAL_GMT_OFF_STD|$LOCAL_GMT_OFF|$isdst| GMT: $h if ($wipe_hopper_clean) { - $stmtA = "DELETE from $vicidial_hopper;"; + if (length($CLIcampaign)>0) + { + $stmtA = "DELETE from $vicidial_hopper where campaign_id = '$CLIcampaign';"; + } + else + { + $stmtA = "DELETE from $vicidial_hopper;"; + } $affected_rows = $dbhA->do($stmtA); if ($DB) {print "Hopper Wiped Clean: $affected_rows\n";} $event_string = "|HOPPER WIPE CLEAN|";