Skip to content

Commit

Permalink
Fix finder plugin for state change.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Hunziker committed Nov 30, 2014
1 parent c744877 commit f37429d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions plg_finder_sermonspeaker/sermonspeaker.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,32 @@ protected function setup()
return true;
}

/**
* Method to get a SQL query to load the published and access states for
* an article and category.
*
* @return JDatabaseQuery A database object.
*
* @since 5.0.3
*/
protected function getStateQuery()
{
$query = $this->db->getQuery(true);

// Item ID
$query->select('a.id');

// Item and category published state
$query->select('a.' . $this->state_field . ' AS state, c.published AS cat_state');

// Item and category access levels
$query->select('c.access AS access, c.access AS cat_access')
->from($this->table . ' AS a')
->join('LEFT', '#__categories AS c ON c.id = a.catid');

return $query;
}

/**
* Method to get the SQL query used to retrieve the list of content items.
*
Expand Down

0 comments on commit f37429d

Please sign in to comment.