r69820 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69819‎ | r69820 | r69821 >
Date:22:37, 23 July 2010
Author:bawolff
Status:ok
Tags:
Comment:
(bug 23293) Don't show change tags when special:rc/rclinked/newpages is transcluded
into another page as it causes UNIQ... to be everywhere.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchangeslinked.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php
@@ -104,10 +104,11 @@
105105 $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
106106 $select[] = 'page_latest';
107107 }
 108+ if ( !$this->including() ) { // bug 23293
 109+ ChangeTags::modifyDisplayQuery( $tables, $select, $conds, $join_conds,
 110+ $query_options, $opts['tagfilter'] );
 111+ }
108112
109 - ChangeTags::modifyDisplayQuery( $tables, $select, $conds, $join_conds,
110 - $query_options, $opts['tagfilter'] );
111 -
112113 // XXX: parent class does this, should we too?
113114 // wfRunHooks('SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts ) );
114115
Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -295,9 +295,13 @@
296296 if ( $this->patrollable( $result ) )
297297 $classes[] = 'not-patrolled';
298298
299 - # Tags, if any.
300 - list( $tagDisplay, $newClasses ) = ChangeTags::formatSummaryRow( $result->ts_tags, 'newpages' );
301 - $classes = array_merge( $classes, $newClasses );
 299+ # Tags, if any. check for including due to bug 23293
 300+ if ( !$this->including() ) {
 301+ list( $tagDisplay, $newClasses ) = ChangeTags::formatSummaryRow( $result->ts_tags, 'newpages' );
 302+ $classes = array_merge( $classes, $newClasses );
 303+ } else {
 304+ $tagDisplay = '';
 305+ }
302306
303307 $css = count($classes) ? ' class="'.implode( " ", $classes).'"' : '';
304308
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -318,12 +318,15 @@
319319 $tables[] = 'page';
320320 $join_conds['page'] = array('LEFT JOIN', 'rc_cur_id=page_id');
321321 }
322 - // Tag stuff.
323 - $fields = array();
324 - // Fields are * in this case, so let the function modify an empty array to keep it happy.
325 - ChangeTags::modifyDisplayQuery(
326 - $tables, $fields, $conds, $join_conds, $query_options, $opts['tagfilter']
327 - );
 322+ if ( !$this->including() ) {
 323+ // Tag stuff.
 324+ // Doesn't work when transcluding. See bug 23293
 325+ $fields = array();
 326+ // Fields are * in this case, so let the function modify an empty array to keep it happy.
 327+ ChangeTags::modifyDisplayQuery(
 328+ $tables, $fields, $conds, $join_conds, $query_options, $opts['tagfilter']
 329+ );
 330+ }
328331
329332 if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options ) ) )
330333 return false;
Index: trunk/phase3/RELEASE-NOTES
@@ -244,6 +244,9 @@
245245 namespace rename.
246246 * Make wfTimestamp recognize negative unix timestamp values.
247247 * (bug 24401) SimpleSearch: No button/text indicating 'Search' if image is disabled
 248+* (bug 23293) Do not show change tags when special:recentchanges(linked)
 249+ or special:newpages is transcluded into another page as it messes up the
 250+ page.
248251
249252 === API changes in 1.17 ===
250253 * (bug 22738) Allow filtering by action type on query=logevent.

Status & tagging log