Skip to content

Commit

Permalink
Update articles.php
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 committed Aug 8, 2016
1 parent ca6777d commit 497ede6
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions administrator/components/com_content/models/articles.php
Expand Up @@ -92,39 +92,39 @@ protected function populateState($ordering = 'a.id', $direction = 'desc')
$this->context .= '.' . $forcedLanguage;
}

$form_submited = JFactory::getApplication()->input->post->get('form_submited');

$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setState('filter.search', $search);

$access = $form_submited ?
JFactory::getApplication()->input->post->get('access') :
$this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access');
if ( $form_submited ) $this->setState('filter.access', $access);

$authorId = $form_submited ?
JFactory::getApplication()->input->post->get('author_id') :
$app->getUserStateFromRequest($this->context . '.filter.author_id', 'filter_author_id');
if ( $form_submited ) $this->setState('filter.author_id', $authorId);

$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);

$categoryId = $form_submited ?
JFactory::getApplication()->input->post->get('category_id') :
$this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id');
if ( $form_submited ) $this->setState('filter.category_id', $categoryId);

$level = $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level');
$this->setState('filter.level', $level);

$language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', '');
$this->setState('filter.language', $language);

$tag = $form_submited ?
JFactory::getApplication()->input->post->get('tag') :
$this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', '');
if ( $form_submited ) $this->setState('filter.tag', $tag);
$formSubmited = $app->input->post->get('form_submited');

$access = $app->getUserStateFromRequest($this->context . '.filter.author_id', 'filter_author_id');
$authorId = $app->getUserStateFromRequest($this->context . '.filter.author_id', 'filter_author_id');
$categoryId = $app->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id');
$tag = $app->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', '');

if ($formSubmited)
{
$access = $app->input->post->get('access');
$this->setState('filter.access', $access);

$authorId = $app->input->post->get('author_id');
$this->setState('filter.author_id', $authorId)

$categoryId = JFactory::getApplication()->input->post->get('category_id');
$this->setState('filter.category_id', $categoryId);

$tag = JFactory::getApplication()->input->post->get('tag')
$this->setState('filter.tag', $tag);
}

// List state information.
parent::populateState($ordering, $direction);
Expand Down

0 comments on commit 497ede6

Please sign in to comment.