Skip to content

Commit

Permalink
Fix histroy filter
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed May 10, 2024
1 parent 4e6d1c2 commit 7013f71
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions galette/lib/Galette/Core/History.php
Expand Up @@ -212,6 +212,7 @@ public function getHistory(): array
*/
private function buildLists(Select $select): void
{
$this->users = [];
try {
$usersSelect = clone $select;
$usersSelect->reset($usersSelect::COLUMNS);
Expand Down Expand Up @@ -312,8 +313,7 @@ private function buildWhereClause(Select $select): void
);
}

//@phpstan-ignore-next-line
if ($this->filters->user_filter != null) {
if ($this->filters->user_filter !== null && $this->filters->user_filter != '0') {
if ($this->filters->user_filter === _T('None')) {
$this->filters->user_filter = '';
}
Expand All @@ -323,8 +323,7 @@ private function buildWhereClause(Select $select): void
);
}

//@phpstan-ignore-next-line
if ($this->filters->action_filter != null && $this->filters->action_filter != '0') {
if ($this->filters->action_filter !== null && $this->filters->action_filter != '0') {
$select->where->equalTo(
'action_log',
$this->filters->action_filter
Expand Down

0 comments on commit 7013f71

Please sign in to comment.