Skip to content

Commit

Permalink
fix(form): malformed SQL when searching for forms
Browse files Browse the repository at this point in the history
btry committed Mar 16, 2022

Unverified

No user is associated with the committer email.
1 parent 6399e00 commit 4b5ac47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/form.class.php
Original file line number Diff line number Diff line change
@@ -671,13 +671,13 @@ public function showFormList(int $rootCategory = 0, string $keywords = '', bool
]
];
if ($helpdeskHome) {
$where_form['AND']["$table_form.helpdesk_home"] = '1';
$where_form['WHERE']['AND']["$table_form.helpdesk_home"] = '1';
}

$selectedCategories = [];
if ($rootCategory != 0) {
$selectedCategories = getSonsOf($table_cat, $rootCategory);
$where_form['AND']["$table_form.$categoryFk"] = $selectedCategories;
$where_form['WHERE']['AND']["$table_form.$categoryFk"] = $selectedCategories;
}

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

0 comments on commit 4b5ac47

Please sign in to comment.