Merge pull request #5122 from fmarcet/3.8

FIX: Not filtering correctly when come from dashboard
This commit is contained in:
Laurent Destailleur 2016-04-29 17:40:03 +02:00
commit b0977e3e2a

View File

@ -81,6 +81,7 @@ $year = GETPOST("year","int");
$day_lim = GETPOST('day_lim','int');
$month_lim = GETPOST('month_lim','int');
$year_lim = GETPOST('year_lim','int');
$filter = GETPOST("filtre");
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test must be present to be compatible with all browsers
{
@ -210,6 +211,15 @@ if ($search_status != '')
{
$sql.= " AND fac.fk_statut = ".$search_status;
}
if ($filter && $filter != -1)
{
$aFilter = explode(',', $filter);
foreach ($aFilter as $fil)
{
$filt = explode(':', $fil);
$sql .= ' AND ' . trim($filt[0]) . ' = ' . trim($filt[1]);
}
}
$nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))