Fix scrutinizer bugs

This commit is contained in:
Laurent Destailleur 2017-09-19 01:39:22 +02:00
parent 89bfb81cc7
commit b723d2c2d2
2 changed files with 5 additions and 5 deletions

View File

@ -147,11 +147,11 @@ if (! $error && $massaction == 'confirm_presend')
foreach($receiver as $key=>$val) foreach($receiver as $key=>$val)
{ {
// Recipient was provided from combo list // Recipient was provided from combo list
if ($val == 'thirdparty') // Id of third party if ($val == 'thirdparty') // Id of third party or user
{ {
$tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>';
} }
elseif ($val) // Id du contact elseif ($val && method_exists($thirdparty, 'contact_get_property')) // Id of contact
{ {
$tmparray[] = $thirdparty->contact_get_property((int) $val,'email'); $tmparray[] = $thirdparty->contact_get_property((int) $val,'email');
$sendtoid[] = $val; $sendtoid[] = $val;

View File

@ -54,6 +54,9 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
$langs->load("companies"); $langs->load("companies");
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
// Filters // Filters
print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="get">'; print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="get">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">'; print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
@ -95,9 +98,6 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
print '</td></tr>'; print '</td></tr>';
} }
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
// Type // Type
print '<tr>'; print '<tr>';
print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">'; print '<td class="nowrap" style="padding-bottom: 2px; padding-right: 4px;">';