Add option MAIN_DISABLE_DEFAULT_FILTER_FOR_QUICK_SEARCH
This commit is contained in:
parent
75e639db6c
commit
e6f0e76988
@ -345,8 +345,20 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL)
|
|||||||
}
|
}
|
||||||
elseif (isset($user->default_values[$relativepathstring]['filters'][$paramname]))
|
elseif (isset($user->default_values[$relativepathstring]['filters'][$paramname]))
|
||||||
{
|
{
|
||||||
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",";","="); // we accept _, -, . and ,
|
if (isset($_POST['sall']) || isset($_POST['search_all']) || isset($_GET['sall']) || isset($_GET['search_all']))
|
||||||
$out = dol_string_nospecial($user->default_values[$relativepathstring]['filters'][$paramname], '', $forbidden_chars_to_replace);
|
{
|
||||||
|
// We made a search from quick search menu, do we still use default filter ?
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_DEFAULT_FILTER_FOR_QUICK_SEARCH))
|
||||||
|
{
|
||||||
|
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",";","="); // we accept _, -, . and ,
|
||||||
|
$out = dol_string_nospecial($user->default_values[$relativepathstring]['filters'][$paramname], '', $forbidden_chars_to_replace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$forbidden_chars_to_replace=array(" ","'","/","\\",":","*","?","\"","<",">","|","[","]",";","="); // we accept _, -, . and ,
|
||||||
|
$out = dol_string_nospecial($user->default_values[$relativepathstring]['filters'][$paramname], '', $forbidden_chars_to_replace);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user