Skip to content
Snippets Groups Projects
Commit 0b4a1d9b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Protection to avoid mass action execution when not required

parent 9127892c
No related branches found
No related tags found
No related merge requests found
......@@ -191,6 +191,11 @@ if (empty($reshook))
$toselect='';
$search_array_options=array();
}
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')
|| GETPOST('button_search_x','alpha') || GETPOST('button_search.x','alpha') || GETPOST('button_search','alpha'))
{
$massaction=''; // Protection to avoid mass action if we force a new search during a mass action confirmation
}
// Mass actions
$objectclass='Commande';
......@@ -776,7 +781,15 @@ if ($resql)
print $langs->trans('ValidateInvoices');
print '</td>';
print '<td>';
print $form->selectyesno('valdate_invoices', 0, 1);
if (! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL))
{
print $form->selectyesno('valdate_invoices', 0, 1, 1);
print ' ('.$langs->trans("AutoValidationNotPossibleWhenStockIsDecreasedOnInvoiceValidation").')';
}
else
{
print $form->selectyesno('valdate_invoices', 0, 1);
}
print '</td>';
print '</tr>';
print '</table>';
......
......@@ -163,6 +163,11 @@ if (empty($reshook))
$toselect='';
$search_array_options=array();
}
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')
|| GETPOST('button_search_x','alpha') || GETPOST('button_search.x','alpha') || GETPOST('button_search','alpha'))
{
$massaction=''; // Protection to avoid mass action if we force a new search during a mass action confirmation
}
// Mass actions
$objectclass='MyObject';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment