Hi,
We noticed that adding a list_description on the non_agent api is not available on the add_list function so we added a piece of code and edited some original codes to accommodate adding a list_description on the add_list function.
----getters
if (isset($_GET["list_description"])) {$list_description=$_GET["list_description"];}
elseif (isset($_POST["list_description"])) {$list_description=$_POST["list_description"];}
---preg replace
$list_description=preg_replace('/[^- \+\.\:\/\@\?\&\_0-9a-zA-Z]/','',$list_description);
----for error checking
if ( (strlen($list_id)<2) or (strlen($list_id)>14) or (strlen($campaign_id)<1) or (strlen($campaign_id)>8) or (strlen($list_description)<1) or (strlen($list_description)>255) or (strlen($list_name)<6) or (strlen($list_name)>30) )
----to capture data
if (strlen($list_description) > 0)
{
if (preg_match("/%3A%2F%2F/",$list_description))
{
$list_description = urldecode($list_description);
$list_description = preg_replace("/ /",'+',$list_description);
}
if ($list_description == '--BLANK--')
{$listdescriptionSQL = " ,list_description=''";}
else
{$listdescriptionSQL = " ,list_description='$list_description'";}
}
----to insert data
$stmt="INSERT INTO vicidial_lists SET list_id='$list_id', list_name='$list_name', list_description='$list_description', campaign_id='$campaign_id', active='$active', campaign_cid_override='$outbound_cid', agent_script_override='$script', am_message_exten_override='$am_message', drop_inbound_group_override='$drop_inbound_group', reset_time='$reset_time', expiration_date='$expiration_date' $webformSQL $webformtwoSQL $webformthreeSQL;";