- $tags = array_fill_keys( $tags, 0 );
- } else {
- $tags = $definedTags;
- }
-
- # Merge in all used tags
- $this->addTables( 'change_tag' );
- $this->addFields( 'ct_tag' );
- $this->addFields( [ 'hitcount' => $fld_hitcount ? 'COUNT(*)' : '0' ] );
- $this->addOption( 'LIMIT', $limit + 1 );
- $this->addOption( 'GROUP BY', 'ct_tag' );
- $this->addWhereRange( 'ct_tag', 'newer', $params['continue'], null );
- $res = $this->select( __METHOD__ );
- foreach ( $res as $row ) {
- $tags[$row->ct_tag] = (int)$row->hitcount;