Added ability for update_lead function insert_if_not_found leads to be inserted into the hopper in the Non-Agent API script
git-svn-id: svn://192.168.202.10@2850 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -124,10 +124,11 @@
|
|||||||
# 170615-0006 - Added DIAL status for manual dial agent calls that have not been answered, to 4 functions
|
# 170615-0006 - Added DIAL status for manual dial agent calls that have not been answered, to 4 functions
|
||||||
# 170713-2312 - Fix for issue #1028
|
# 170713-2312 - Fix for issue #1028
|
||||||
# 170815-1315 - Added HTTP error code 418
|
# 170815-1315 - Added HTTP error code 418
|
||||||
|
# 171114-1015 - Added ability for update_lead function insert_if_not_found leads to be inserted into the hopper
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.14-100';
|
$version = '2.14-101';
|
||||||
$build = '170815-1315';
|
$build = '171114-1015';
|
||||||
$api_url_log = 0;
|
$api_url_log = 0;
|
||||||
|
|
||||||
$startMS = microtime();
|
$startMS = microtime();
|
||||||
@@ -7900,6 +7901,7 @@ if ($function == 'update_lead')
|
|||||||
$find_lead_id=0;
|
$find_lead_id=0;
|
||||||
$find_vendor_lead_code=0;
|
$find_vendor_lead_code=0;
|
||||||
$find_phone_number=0;
|
$find_phone_number=0;
|
||||||
|
$insert_if_not_found_inserted=0;
|
||||||
if ( (strlen($search_location)<4) or ($list_id < 99) or (strlen($list_id)<3) )
|
if ( (strlen($search_location)<4) or ($list_id < 99) or (strlen($list_id)<3) )
|
||||||
{$search_location='SYSTEM';}
|
{$search_location='SYSTEM';}
|
||||||
if (strlen($search_method)<6)
|
if (strlen($search_method)<6)
|
||||||
@@ -8508,6 +8510,7 @@ if ($function == 'update_lead')
|
|||||||
if ($DB>0) {echo "DEBUG: update_lead query - $stmt\n";}
|
if ($DB>0) {echo "DEBUG: update_lead query - $stmt\n";}
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
$affected_rows = mysqli_affected_rows($link);
|
$affected_rows = mysqli_affected_rows($link);
|
||||||
|
$insert_if_not_found_inserted = $affected_rows;
|
||||||
if ($affected_rows > 0)
|
if ($affected_rows > 0)
|
||||||
{
|
{
|
||||||
$lead_id = mysqli_insert_id($link);
|
$lead_id = mysqli_insert_id($link);
|
||||||
@@ -8696,7 +8699,7 @@ if ($function == 'update_lead')
|
|||||||
}
|
}
|
||||||
|
|
||||||
### BEGIN add to hopper section ###
|
### BEGIN add to hopper section ###
|
||||||
if ( ($add_to_hopper == 'Y') and ($search_found > 0) )
|
if ( ($add_to_hopper == 'Y') and ( ($search_found > 0) or ($insert_if_not_found_inserted > 0) ) )
|
||||||
{
|
{
|
||||||
$stmt="SELECT count(*) from vicidial_hopper where lead_id='$lead_id';";
|
$stmt="SELECT count(*) from vicidial_hopper where lead_id='$lead_id';";
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
|||||||
Reference in New Issue
Block a user