Show tagfilter, when transclude RC special pages
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 4 Aug 2012 20:20:00 +0000 (22:20 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 21 Aug 2012 15:35:13 +0000 (17:35 +0200)
This reverts bug 23293, because with tagfilter, I see no UNIQ things.

By the way, the fix for bug 23293 was not the best, because it modify
for two pages the query and for the third only the display part.

This also realign the ChangeTags::modifyDisplayQuery calls and fix the
way, SpecialNewImages gets 'ts_tags' into the select

Change-Id: I09cfa5697561970399622920214a569e9a712080

RELEASE-NOTES-1.20
includes/specials/SpecialNewpages.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialRecentchangeslinked.php

index ac456bf..6b9de40 100644 (file)
@@ -127,6 +127,7 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki.
 * Allow importing pages as subpage.
 * Add lang and hreflang attributes to language links on Login page.
 * (bug 22749) Create Special:MostInterwikis.
+* Show change tags when transclude Special:Recentchanges(linked) or Special:Newpages.
 
 === Bug fixes in 1.20 ===
 * (bug 30245) Use the correct way to construct a log page title.
index 19ea171..8e15d55 100644 (file)
@@ -360,8 +360,8 @@ class SpecialNewpages extends IncludableSpecialPage {
                        $classes[] = 'mw-newpages-zero-byte-page';
                }
 
-               # Tags, if any. check for including due to bug 23293
-               if ( !$this->including() ) {
+               # Tags, if any.
+               if( isset( $result->ts_tags ) ) {
                        list( $tagDisplay, $newClasses ) = ChangeTags::formatSummaryRow( $result->ts_tags, 'newpages' );
                        $classes = array_merge( $classes, $newClasses );
                } else {
@@ -530,7 +530,7 @@ class NewPagesPager extends ReverseChronologicalPager {
                $fields = array(
                        'rc_namespace', 'rc_title', 'rc_cur_id', 'rc_user', 'rc_user_text',
                        'rc_comment', 'rc_timestamp', 'rc_patrolled','rc_id', 'rc_deleted',
-                       'length' => 'page_len', 'rev_id' => 'page_latest', 'ts_tags', 'rc_this_oldid',
+                       'length' => 'page_len', 'rev_id' => 'page_latest', 'rc_this_oldid',
                        'page_namespace', 'page_title'
                );
                $join_conds = array( 'page' => array( 'INNER JOIN', 'page_id=rc_cur_id' ) );
@@ -546,13 +546,10 @@ class NewPagesPager extends ReverseChronologicalPager {
                        'join_conds' => $join_conds
                );
 
-               // Empty array for fields, it'll be set by us anyway.
-               $fields = array();
-
                // Modify query for tags
                ChangeTags::modifyDisplayQuery(
                        $info['tables'],
-                       $fields,
+                       $info['fields'],
                        $info['conds'],
                        $info['join_conds'],
                        $info['options'],
index ec8f93b..2bd8b0a 100644 (file)
@@ -396,14 +396,15 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                        $fields[] = 'page_latest';
                        $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
                }
-               if ( !$this->including() ) {
-                       // Tag stuff.
-                       // Doesn't work when transcluding. See bug 23293
-                       ChangeTags::modifyDisplayQuery(
-                               $tables, $fields, $conds, $join_conds, $query_options,
-                               $opts['tagfilter']
-                       );
-               }
+               // Tag stuff.
+               ChangeTags::modifyDisplayQuery(
+                       $tables,
+                       $fields,
+                       $conds,
+                       $join_conds,
+                       $query_options,
+                       $opts['tagfilter']
+               );
 
                if ( !wfRunHooks( 'SpecialRecentChangesQuery',
                        array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$fields ) ) )
index 9010e10..862736d 100644 (file)
@@ -110,10 +110,14 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges {
                        $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
                        $select[] = 'page_latest';
                }
-               if ( !$this->including() ) { // bug 23293
-                       ChangeTags::modifyDisplayQuery( $tables, $select, $conds, $join_conds,
-                               $query_options, $opts['tagfilter'] );
-               }
+               ChangeTags::modifyDisplayQuery(
+                       $tables,
+                       $select,
+                       $conds,
+                       $join_conds,
+                       $query_options,
+                       $opts['tagfilter']
+               );
 
                if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ) ) ) {
                        return false;