Skip to content

Commit

Permalink
Correcting contact's articles order
Browse files Browse the repository at this point in the history
  • Loading branch information
infograf768 committed May 11, 2017
1 parent d5ef7f9 commit 24ab819
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/com_contact/models/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ protected function buildContactExtendedData($contact)
->select('a.access')
->select('a.catid')
->select('a.created')
->select('a.language');
->select('a.language')
->select('a.publish_up');

// SQL Server changes
$case_when = ' CASE WHEN ';
Expand All @@ -316,7 +317,7 @@ protected function buildContactExtendedData($contact)
->join('LEFT', '#__categories as c on a.catid=c.id')
->where('a.created_by = ' . (int) $contact->user_id)
->where('a.access IN (' . $groups . ')')
->order('a.state DESC, a.created DESC');
->order('a.publish_up DESC');

// Filter per language if plugin published
if (JLanguageMultilang::isEnabled())
Expand Down Expand Up @@ -476,7 +477,8 @@ protected function getContactQuery($pk = null)
->select('a.access')
->select('a.catid')
->select('a.created')
->select('a.language');
->select('a.language')
->select('a.publish_up');

// SQL Server changes
$case_when = ' CASE WHEN ';
Expand All @@ -498,7 +500,7 @@ protected function getContactQuery($pk = null)
->join('LEFT', '#__categories as c on a.catid=c.id')
->where('a.created_by = ' . (int) $result->user_id)
->where('a.access IN (' . $groups . ')')
->order('a.state DESC, a.created DESC');
->order('a.publish_up DESC');

// Filter per language if plugin published
if (JLanguageMultilang::isEnabled())
Expand Down

0 comments on commit 24ab819

Please sign in to comment.