Skip to content

Commit

Permalink
fix(form): entity restrict problem
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jul 9, 2020
1 parent 7752758 commit 88da1e7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions inc/form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -827,13 +827,17 @@ public function showFormList($rootCategory = 0, $keywords = '', $helpdeskHome =

$order = "$table_form.name ASC";

$dbUtils = new DBUtils();
$dbUtils = new DbUtils();
$entityRestrict = $dbUtils->getEntitiesRestrictCriteria($table_form, "", "", true, false);
if (count($entityRestrict)) {
$entityRestrict = [$entityRestrict];
}
$where_form = [
'AND' => [
"$table_form.is_active" => '1',
"$table_form.is_deleted" => '0',
"$table_form.language" => [$_SESSION['glpilanguage'], '0', '', null],
] + $dbUtils->getEntitiesRestrictCriteria($table_form, '', '', true, false)
] + $entityRestrict
];
if ($helpdeskHome) {
$where_form['AND']["$table_form.helpdesk_home"] = '1';
Expand Down

0 comments on commit 88da1e7

Please sign in to comment.