Skip to content

Commit

Permalink
[4] Fix trash menu items displaying logic (#33406)
Browse files Browse the repository at this point in the history
Fix trashing items ACL checks
  • Loading branch information
Phil E. Taylor authored Apr 30, 2021
1 parent 1e35de4 commit aedf7e3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ protected function addToolbar(): void
$childBar->publish('languages.publish')->listCheck(true);
$childBar->unpublish('languages.unpublish')->listCheck(true);

if (!$this->state->get('filter.published') == -2)
if ($this->state->get('filter.published') != -2)
{
$childBar->trash('languages.trash')->listCheck(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ protected function addToolbar()
$childBar->checkin('newsfeeds.checkin')->listCheck(true);
}

if (!$this->state->get('filter.published') == -2)
if ($this->state->get('filter.published') != -2)
{
$childBar->trash('newsfeeds.trash')->listCheck(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ protected function addToolbar()
$childBar->checkin('tags.checkin')->listCheck(true);
}

if ($canDo->get('core.edit.state') && !$this->state->get('filter.published') == -2)
if ($canDo->get('core.edit.state') && $this->state->get('filter.published') != -2)
{
$childBar->trash('tags.trash')->listCheck(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ protected function addToolbar()
$childBar->checkin('notes.checkin')->listCheck(true);
}

if (!$this->state->get('filter.published') == -2 && $canDo->get('core.edit.state'))
if ($this->state->get('filter.published') != -2 && $canDo->get('core.edit.state'))
{
$childBar->trash('notes.trash');
}
Expand Down

0 comments on commit aedf7e3

Please sign in to comment.