Skip to content

Commit

Permalink
Merge pull request #11 from beat/patch-3
Browse files Browse the repository at this point in the history
Check publish_up and publish_down with published
  • Loading branch information
infograf768 authored and Bakual committed May 12, 2014
2 parents 0bf88cb + 51c2bed commit ea26c84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/com_contact/models/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,6 @@ 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.')')
->where('(a.publish_up = ' . $nullDate . ' OR a.publish_up <= ' . $nowDate . ')')
->where('(a.publish_down = ' . $nullDate . ' OR a.publish_down >= ' . $nowDate . ')')
->order('a.state DESC, a.created DESC');
// filter per language if plugin published
if (JLanguageMultilang::isEnabled())
Expand All @@ -346,7 +344,9 @@ protected function getContactQuery($pk = null)
}
if (is_numeric($published))
{
$query->where('a.state IN (1,2)');
$query->where('a.state IN (1,2)')
->where('(a.publish_up = ' . $nullDate . ' OR a.publish_up <= ' . $nowDate . ')')
->where('(a.publish_down = ' . $nullDate . ' OR a.publish_down >= ' . $nowDate . ')');
}
$db->setQuery($query, 0, 10);
$articles = $db->loadObjectList();
Expand Down

0 comments on commit ea26c84

Please sign in to comment.