Merge "Detect leakage of error_reporting state in tests."
[lhc/web/wiklou.git] / includes / ChangeTags.php
index 3fc27f9..fd94bea 100644 (file)
@@ -193,18 +193,14 @@ class ChangeTags {
                        throw new MWException( 'Unable to determine appropriate JOIN condition for tagging.' );
                }
 
-               // JOIN on tag_summary
-               $tables[] = 'tag_summary';
-               $join_conds['tag_summary'] = array( 'LEFT JOIN', "ts_$join_cond=$join_cond" );
-               $fields[] = 'ts_tags';
+               $fields['ts_tags'] = wfGetDB( DB_SLAVE )->buildGroupConcatField(
+                       ',', 'change_tag', 'ct_tag', "ct_$join_cond=$join_cond"
+               );
 
                if ( $wgUseTagFilter && $filter_tag ) {
                        // Somebody wants to filter on a tag.
                        // Add an INNER JOIN on change_tag
 
-                       // FORCE INDEX -- change_tags will almost ALWAYS be the correct query plan.
-                       $options['USE INDEX'] = array( 'change_tag' => 'change_tag_tag_id' );
-                       unset( $options['FORCE INDEX'] );
                        $tables[] = 'change_tag';
                        $join_conds['change_tag'] = array( 'INNER JOIN', "ct_$join_cond=$join_cond" );
                        $conds['ct_tag'] = $filter_tag;
@@ -232,7 +228,7 @@ class ChangeTags {
                }
 
                $data = array( Html::rawElement( 'label', array( 'for' => 'tagfilter' ), wfMessage( 'tag-filter' )->parse() ),
-                       Xml::input( 'tagfilter', 20, $selected, array( 'class' => 'mw-tagfilter-input' ) ) );
+                       Xml::input( 'tagfilter', 20, $selected, array( 'class' => 'mw-tagfilter-input', 'id' => 'tagfilter' ) ) );
 
                if ( !$fullForm ) {
                        return $data;