diff --git a/bin/AST_VDhopper.pl b/bin/AST_VDhopper.pl index 24ea9814..c147cbf9 100644 --- a/bin/AST_VDhopper.pl +++ b/bin/AST_VDhopper.pl @@ -72,6 +72,7 @@ # 120210-1735 - Added vendor_lead_code duplication check per campaign option # 120402-2211 - Fixed call count limit bug # 121124-2052 - Added List Expiration Date and Other Campaign DNC options +# 121205-1621 - Added parentheses around filter SQL when in SQL queries # # constants @@ -1781,7 +1782,7 @@ foreach(@campaign_id) } $sthA->finish(); $lead_filter_sql[$i] =~ s/^and|and$|^or|or$|^ and|and $|^ or|or $//gi; - $lead_filter_sql[$i] = "and $lead_filter_sql[$i]"; + $lead_filter_sql[$i] = "and ($lead_filter_sql[$i])"; if ($DB) {print " lead filter $lead_filter_id[$i] defined for $campaign_id[$i]\n";} if ($DBX) {print " |$lead_filter_sql[$i]|\n";} } diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php index f991e293..6ac499bc 100644 --- a/www/agc/vdc_db_query.php +++ b/www/agc/vdc_db_query.php @@ -319,10 +319,11 @@ # 121120-0838 - Added QM socket-send functionality # 121124-2357 - Added Other Campaign DNC option # 121130-0740 - Added call notes option to dispo call url +# 121205-1620 - Added parentheses around filter SQL when in SQL queries # -$version = '2.6-217'; -$build = '121130-0740'; +$version = '2.6-218'; +$build = '121205-1620'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=446; $one_mysql_log=0; @@ -1969,7 +1970,7 @@ if ($ACTION == 'manDiaLnextCaLL') if ($filtersql_ct > 0) { $row=mysql_fetch_row($rslt); - $fSQL = "and $row[0]"; + $fSQL = "and ($row[0])"; $fSQL = preg_replace('/\\\\/','',$fSQL); } diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 6d4c28ad..ef1304e9 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -3205,12 +3205,13 @@ else # 121124-1957 - Added List Expiration Date feature and Campaign Other-DNC-List feature # 121129-2319 - Added enhanced_disconnect_logging option # 121130-1425 - Fixed user group permissions issue with allowed campaigns modifications of user groups +# 121205-1619 - Added parentheses around filter SQL when in SQL queries # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.6-387a'; -$build = '121130-1425'; +$admin_version = '2.6-388a'; +$build = '121205-1619'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -8867,7 +8868,7 @@ if ($ADD==73) $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} + {$fSQL = "and ($filterSQL)";} else {$fSQL = '';} @@ -22316,7 +22317,7 @@ if ($ADD==31) $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} + {$fSQL = "and ($filterSQL)";} else {$fSQL = '';} @@ -22375,7 +22376,7 @@ if ($ADD==31) $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} + {$fSQL = "and ($filterSQL)";} else {$fSQL = '';} } @@ -23779,7 +23780,7 @@ if ($ADD==34) $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} + {$fSQL = "and ($filterSQL)";} else {$fSQL = '';} @@ -24966,7 +24967,7 @@ if ($ADD==311) $filterSQL = preg_replace("/\\\\/","",$filterSQL); $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} + {$fSQL = "and ($filterSQL)";} else {$fSQL = '';} }