Add try catch
This commit is contained in:
parent
7cb283d0ea
commit
a5deeebfdc
@ -98,7 +98,6 @@ if ($action == 'add')
|
|||||||
$result=$obj->add_to_target($id,$filtersarray);
|
$result=$obj->add_to_target($id,$filtersarray);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("XTargetsAdded",$result),'mesgs');
|
setEventMessage($langs->trans("XTargetsAdded",$result),'mesgs');
|
||||||
@ -167,7 +166,6 @@ if ($_POST["button_removefilter"])
|
|||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans("Mailing"),'EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing');
|
llxHeader('',$langs->trans("Mailing"),'EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing');
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -306,12 +304,14 @@ if ($object->fetch($id) >= 0)
|
|||||||
print img_object($langs->trans("Module").': '.get_class($obj),$obj->picto).' '.$obj->getDesc();
|
print img_object($langs->trans("Module").': '.get_class($obj),$obj->picto).' '.$obj->getDesc();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
/*
|
try {
|
||||||
print '<td width=\"100\">';
|
$nbofrecipient=$obj->getNbOfRecipients('');
|
||||||
print $modulename;
|
}
|
||||||
print "</td>";
|
catch(Exception $e)
|
||||||
*/
|
{
|
||||||
$nbofrecipient=$obj->getNbOfRecipients('');
|
dol_syslog($e->getMessage(), LOG_ERR);
|
||||||
|
}
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($nbofrecipient >= 0)
|
if ($nbofrecipient >= 0)
|
||||||
{
|
{
|
||||||
@ -324,7 +324,13 @@ if ($object->fetch($id) >= 0)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
$filter=$obj->formFilter();
|
try {
|
||||||
|
$filter=$obj->formFilter();
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
dol_syslog($e->getMessage(), LOG_ERR);
|
||||||
|
}
|
||||||
if ($filter) print $filter;
|
if ($filter) print $filter;
|
||||||
else print $langs->trans("None");
|
else print $langs->trans("None");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user