Skip to content

Commit

Permalink
refactor: improved code
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Oct 19, 2024
1 parent 7dfaa0e commit c5b5f10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion phpmyfaq/admin/record.edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@

// Group permissions
$groupPermission = $faqPermission->get(FaqPermission::GROUP, $faqData['id']);
if (count($groupPermission) == 0 || $groupPermission[0] == -1) {
if (empty($groupPermission) || in_array(-1, $groupPermission, true)) {
$allGroups = true;
$restrictedGroups = false;
$groupPermission[0] = -1;
Expand Down
3 changes: 1 addition & 2 deletions phpmyfaq/src/phpMyFAQ/Faq/FaqPermission.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ public function delete(string $mode, int $faqId): bool
$mode,
$faqId
);
$this->config->getDb()->query($query);

return true;
return (bool) $this->config->getDb()->query($query);
}

/**
Expand Down

0 comments on commit c5b5f10

Please sign in to comment.