(bug 23293) Don't show change tags when special:rc/rclinked/newpages is transcluded
authorBrian Wolff <bawolff@users.mediawiki.org>
Fri, 23 Jul 2010 22:37:52 +0000 (22:37 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Fri, 23 Jul 2010 22:37:52 +0000 (22:37 +0000)
into another page as it causes UNIQ... to be everywhere.

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

index e8ec3bb..996ab9e 100644 (file)
@@ -244,6 +244,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   namespace rename.
 * Make wfTimestamp recognize negative unix timestamp values.
 * (bug 24401) SimpleSearch: No button/text indicating 'Search' if image is disabled
+* (bug 23293) Do not show change tags when special:recentchanges(linked)
+  or special:newpages is transcluded into another page as it messes up the
+  page.
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent.
index 6c9990f..7f755a8 100644 (file)
@@ -295,9 +295,13 @@ class SpecialNewpages extends IncludableSpecialPage {
                if ( $this->patrollable( $result ) )
                        $classes[] = 'not-patrolled';
 
-               # Tags, if any.
-               list( $tagDisplay, $newClasses ) = ChangeTags::formatSummaryRow( $result->ts_tags, 'newpages' );
-               $classes = array_merge( $classes, $newClasses );
+               # Tags, if any. check for including due to bug 23293
+               if ( !$this->including() ) {
+                       list( $tagDisplay, $newClasses ) = ChangeTags::formatSummaryRow( $result->ts_tags, 'newpages' );
+                       $classes = array_merge( $classes, $newClasses );
+               } else {
+                       $tagDisplay = '';
+               }
 
                $css = count($classes) ? ' class="'.implode( " ", $classes).'"' : '';
 
index 2aa35b5..4103b98 100644 (file)
@@ -318,12 +318,15 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                        $tables[] = 'page';
                        $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
                }
-               // Tag stuff.
-               $fields = array();
-               // Fields are * in this case, so let the function modify an empty array to keep it happy.
-               ChangeTags::modifyDisplayQuery(
-                       $tables, $fields, $conds, $join_conds, $query_options, $opts['tagfilter']
-               );
+               if ( !$this->including() ) {
+                       // Tag stuff.
+                       // Doesn't work when transcluding. See bug 23293
+                       $fields = array();
+                       // Fields are * in this case, so let the function modify an empty array to keep it happy.
+                       ChangeTags::modifyDisplayQuery(
+                               $tables, $fields, $conds, $join_conds, $query_options, $opts['tagfilter']
+                       );
+               }
 
                if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options ) ) )
                        return false;
index e72157c..387679f 100644 (file)
@@ -104,9 +104,10 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges {
                        $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
                        $select[] = 'page_latest';
                }
-
-               ChangeTags::modifyDisplayQuery( $tables, $select, $conds, $join_conds,
-                       $query_options, $opts['tagfilter'] );
+               if ( !$this->including() ) { // bug 23293
+                       ChangeTags::modifyDisplayQuery( $tables, $select, $conds, $join_conds,
+                               $query_options, $opts['tagfilter'] );
+               }
 
                // XXX: parent class does this, should we too?
                // wfRunHooks('SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts ) );