Skip to content

Commit

Permalink
Merge branch '4.2-dev' into 4.2-finder-plgoptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar committed Feb 4, 2022
2 parents 73a42ce + b087620 commit 1c407b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions api/components/com_content/src/Controller/ArticlesController.php
Expand Up @@ -75,6 +75,18 @@ public function displayList()
$this->modelState->set('filter.language', $filter->clean($apiFilterInfo['language'], 'STRING'));
}

$apiListInfo = $this->input->get('list', [], 'array');

if (array_key_exists('ordering', $apiListInfo))
{
$this->modelState->set('list.ordering', $filter->clean($apiListInfo['ordering'], 'STRING'));
}

if (array_key_exists('direction', $apiListInfo))
{
$this->modelState->set('list.direction', $filter->clean($apiListInfo['direction'], 'STRING'));
}

return parent::displayList();
}

Expand Down

0 comments on commit 1c407b8

Please sign in to comment.