Fix filter lost
This commit is contained in:
parent
09355b0c7b
commit
a54589c13c
@ -259,15 +259,16 @@ if ($socname)
|
|||||||
$sortorder = "ASC";
|
$sortorder = "ASC";
|
||||||
}
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list))
|
foreach ($search_array_options as $key => $val)
|
||||||
{
|
{
|
||||||
foreach($extrafields->attribute_list as $key => $val)
|
$crit=$val;
|
||||||
|
$tmpkey=preg_replace('/search_options_/','',$key);
|
||||||
|
$typ=$extrafields->attribute_type[$tmpkey];
|
||||||
|
$mode=0;
|
||||||
|
if (in_array($typ, array('int'))) $mode=1; // Search on a numeric
|
||||||
|
if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit)))
|
||||||
{
|
{
|
||||||
$crit=GETPOST('search_options_'.$key);
|
$sql .= natural_search('ef.'.$tmpkey, $crit, $mode);
|
||||||
if ($val && $crit != '')
|
|
||||||
{
|
|
||||||
$sql .= natural_search('ef.'.$key, $crit);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Add where from hooks
|
// Add where from hooks
|
||||||
@ -317,9 +318,15 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
if ($search_level_from != '') $param.='&search_level_from='.$search_level_from;
|
if ($search_level_from != '') $param.='&search_level_from='.$search_level_from;
|
||||||
if ($search_level_to != '') $param.='&search_level_to='.$search_level_to;
|
if ($search_level_to != '') $param.='&search_level_to='.$search_level_to;
|
||||||
if ($search_categ != '') $param.='&search_categ='.$search_categ;
|
if ($search_categ != '') $param.='&search_categ='.urlencode($search_categ);
|
||||||
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
|
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
|
||||||
if ($search_status != '') $param.='&search_status='.$search_status;
|
if ($search_status != '') $param.='&search_status='.$search_status;
|
||||||
|
foreach ($search_array_options as $key => $val)
|
||||||
|
{
|
||||||
|
$crit=$val;
|
||||||
|
$tmpkey=preg_replace('/search_options_/','',$key);
|
||||||
|
$param.='&search_options_'.$tmpkey.'='.urlencode($val);
|
||||||
|
}
|
||||||
// $param and $urladd should have the same value
|
// $param and $urladd should have the same value
|
||||||
$urladd = $param;
|
$urladd = $param;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user