Skip to content

Commit

Permalink
ENH Stop using Controller::has_curr()
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Feb 13, 2025
1 parent dca4ede commit 454e34a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Model/BlogPostFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@ class BlogPostFilter extends Extension
{
/**
* Augment queries so that we don't fetch unpublished articles.
*
* @param SQLSelect $query
* @param DataQuery $query
*/
protected function augmentSQL(SQLSelect $query, ?DataQuery $dataQuery = null)
{

if (Controller::has_curr() && Controller::curr() instanceof LeftAndMain) {
$controller = Controller::curr();
if ($controller && $controller instanceof LeftAndMain) {
return;
}

Expand Down

0 comments on commit 454e34a

Please sign in to comment.