Added the admin filter type switch to compiler gh-378. Moved the name_single and name_list to the view->name_list and view->name_list_code in the compiler (refactoring).

This commit is contained in:
2020-11-17 06:06:34 +02:00
parent e7104d9c1c
commit d7233a1420
8 changed files with 469 additions and 339 deletions

View File

@ -4876,7 +4876,7 @@ class Fields extends Structure
'list' => $_list);
}
// build the filter values
if ($dbSwitch && (isset($field['filter']) && $field['filter'] == 1)
if ($dbSwitch && (isset($field['filter']) && $field['filter'] >= 1)
&& ($listSwitch || $listJoin)
&& (!$multiple && $typeName != 'checkbox'
&& $typeName != 'checkboxes'
@ -4884,6 +4884,7 @@ class Fields extends Structure
&& $typeName != 'subform'))
{
$this->filterBuilder[$view_name_list][] = array('type' => $typeName,
'multi' => $field['filter'],
'code' => $name,
'lang' => $listLangName,
'database' => $view_name_single,