Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

To fix MDL-8614

  • Loading branch information...
commit f4959dc93905c2a51d7e2f603b330765d1be7969 1 parent e7a84ec
paca70 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 blocks/blog_tags/block_blog_tags.php
4 blocks/blog_tags/block_blog_tags.php
View
@@ -71,13 +71,13 @@ function get_content() {
$timewithin = $this->config->timewithin * 24 * 60 * 60; /// convert to seconds
- $sql = 'SELECT t.*, COUNT(DISTINCT bt.id) as ct ';
+ $sql = 'SELECT t.id, t.type, t.text, COUNT(DISTINCT bt.id) as ct ';
$sql .= "FROM {$CFG->prefix}tags as t, {$CFG->prefix}blog_tag_instance as bt, {$CFG->prefix}post as p ";
$sql .= 'WHERE t.id = bt.tagid ';
$sql .= 'AND p.id = bt.entryid ';
$sql .= 'AND (p.publishstate = \'site\' or p.publishstate=\'public\') ';
$sql .= "AND bt.timemodified > {$timewithin} ";
- $sql .= 'GROUP BY bt.tagid ';
+ $sql .= 'GROUP BY t.id, t.type, t.text ';
$sql .= 'ORDER BY ct DESC, t.text ASC ';
$sql .= "LIMIT {$this->config->numberoftags} ";
Please sign in to comment.
Something went wrong with that request. Please try again.