Skip to content

Commit 4b5ac47

Browse files
committed
fix(form): malformed SQL when searching for forms
1 parent 6399e00 commit 4b5ac47

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inc/form.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -671,13 +671,13 @@ public function showFormList(int $rootCategory = 0, string $keywords = '', bool
671671
]
672672
];
673673
if ($helpdeskHome) {
674-
$where_form['AND']["$table_form.helpdesk_home"] = '1';
674+
$where_form['WHERE']['AND']["$table_form.helpdesk_home"] = '1';
675675
}
676676

677677
$selectedCategories = [];
678678
if ($rootCategory != 0) {
679679
$selectedCategories = getSonsOf($table_cat, $rootCategory);
680-
$where_form['AND']["$table_form.$categoryFk"] = $selectedCategories;
680+
$where_form['WHERE']['AND']["$table_form.$categoryFk"] = $selectedCategories;
681681
}
682682

683683
$where_form['GROUPBY'] = [
@@ -780,7 +780,7 @@ public function showFormList(int $rootCategory = 0, string $keywords = '', bool
780780
$query_forms['SELECT'] = [
781781
$table_form => ['id', 'name', 'icon', 'icon_color', 'background_color', 'description', 'usage_count'],
782782
];
783-
$query_forms['AND']["$table_form.is_default"] = ['<>', '0'];
783+
$query_forms['WHERE']['AND']["$table_form.is_default"] = ['<>', '0'];
784784
$query_forms['ORDER'] = [
785785
$order
786786
];

0 commit comments

Comments
 (0)