From 3e7fe5741025dbe8c229c0468e6829bdf87911d8 Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 15 Feb 2018 18:42:44 +0000 Subject: [PATCH] fix for AST_VDadapt.pl issue git-svn-id: svn://192.168.202.10@2918 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/bin/AST_VDadapt.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/agc_2-X/trunk/bin/AST_VDadapt.pl b/agc_2-X/trunk/bin/AST_VDadapt.pl index efa3f260..4a6b4a75 100644 --- a/agc_2-X/trunk/bin/AST_VDadapt.pl +++ b/agc_2-X/trunk/bin/AST_VDadapt.pl @@ -691,6 +691,21 @@ while ($master_loop < $CLIloops) if ($ICBQcount > 0) { + $vci=0; + $INBOUNDcampsSQL="''"; + $stmtA = "SELECT campaign_id FROM vicidial_campaigns where active='Y' and campaign_allow_inbound='Y';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + while ($sthArows > $vci) + { + @aryA = $sthA->fetchrow_array; + if ($vci < 1) {$INBOUNDcampsSQL = "'$aryA[0]'";} + else {$INBOUNDcampsSQL .= ",'$aryA[0]'";} + $vci++; + } + $sthA->finish(); + $now_epoch = time(); $BDtarget = ($now_epoch - 7); ($Bsec,$Bmin,$Bhour,$Bmday,$Bmon,$Byear,$Bwday,$Byday,$Bisdst) = localtime($BDtarget);