Skip to content

Commit

Permalink
Merge pull request #9061 from bertmert/patch-54
Browse files Browse the repository at this point in the history
Fixes 9054 (part 5, com_content Featured). [REGRESSION] sort order
  • Loading branch information
wilsonge committed Feb 3, 2016
2 parents f3479a9 + 0eb1f34 commit 3ebcbe0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions administrator/components/com_content/models/articles.php
Expand Up @@ -74,7 +74,7 @@ public function __construct($config = array())
*
* @since 1.6
*/
protected function populateState($ordering = null, $direction = null)
protected function populateState($ordering = 'a.id', $direction = 'desc')
{
$app = JFactory::getApplication();

Expand Down Expand Up @@ -109,7 +109,7 @@ protected function populateState($ordering = null, $direction = null)
$this->setState('filter.tag', $tag);

// List state information.
parent::populateState('a.id', 'desc');
parent::populateState($ordering, $direction);

// Force a language
$forcedLanguage = $app->input->get('forcedLanguage');
Expand Down
17 changes: 17 additions & 0 deletions administrator/components/com_content/models/featured.php
Expand Up @@ -202,4 +202,21 @@ protected function getListQuery($resolveFKs = true)

return $query;
}

/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @param string $ordering An optional ordering field.
* @param string $direction An optional direction (asc|desc).
*
* @return void
*
* @since 1.6
*/
protected function populateState($ordering = 'a.title', $direction = 'asc')
{
parent::populateState($ordering, $direction);
}
}

0 comments on commit 3ebcbe0

Please sign in to comment.