Skip to content

Commit

Permalink
Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
alikon committed Jul 22, 2016
1 parent 74f875a commit 63e2ba6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion administrator/components/com_content/models/articles.php
Expand Up @@ -205,7 +205,8 @@ protected function getListQuery()
if (JPluginHelper::isEnabled('content', 'vote'))
{
$assogroup = 'a.id, l.title, l.image, uc.name, ag.title, c.title, ua.name, v.rating_sum, v.rating_count';
$query->select('COALESCE(NULLIF(ROUND(v.rating_sum / v.rating_count, 0), 0), 0) AS rating, COALESCE(NULLIF(v.rating_count, 0), 0) as rating_count')
$query->select('COALESCE(NULLIF(ROUND(v.rating_sum / v.rating_count, 0), 0), 0) AS rating,
COALESCE(NULLIF(v.rating_count, 0), 0) as rating_count')
->join('LEFT', '#__content_rating AS v ON a.id = v.content_id');
}

Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_content/models/featured.php
Expand Up @@ -112,7 +112,8 @@ protected function getListQuery($resolveFKs = true)
// Join on voting table
if (JPluginHelper::isEnabled('content', 'vote'))
{
$query->select('COALESCE(NULLIF(ROUND(v.rating_sum / v.rating_count, 0), 0), 0) AS rating, COALESCE(NULLIF(v.rating_count, 0), 0) as rating_count')
$query->select('COALESCE(NULLIF(ROUND(v.rating_sum / v.rating_count, 0), 0), 0) AS rating,
COALESCE(NULLIF(v.rating_count, 0), 0) as rating_count')
->join('LEFT', '#__content_rating AS v ON a.id = v.content_id');
}

Expand Down
3 changes: 2 additions & 1 deletion components/com_content/models/articles.php
Expand Up @@ -256,7 +256,8 @@ protected function getListQuery()
if (JPluginHelper::isEnabled('content', 'vote'))
{
// Join on voting table
$query->select('COALESCE(NULLIF(ROUND(v.rating_sum / v.rating_count, 0), 0), 0) AS rating, COALESCE(NULLIF(v.rating_count, 0), 0) as rating_count')
$query->select('COALESCE(NULLIF(ROUND(v.rating_sum / v.rating_count, 0), 0), 0) AS rating,
COALESCE(NULLIF(v.rating_count, 0), 0) as rating_count')
->join('LEFT', '#__content_rating AS v ON a.id = v.content_id');
}

Expand Down

0 comments on commit 63e2ba6

Please sign in to comment.