From 9db190c7e736ec8d063187d4241b59feaf7dc2d1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 22 Jun 2011 11:28:20 +0200 Subject: update to MediaWiki 1.17.0 --- includes/specials/SpecialRecentchangeslinked.php | 43 ++++++++++++++++++------ 1 file changed, 33 insertions(+), 10 deletions(-) (limited to 'includes/specials/SpecialRecentchangeslinked.php') diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index 3b549843..db0f554d 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -1,15 +1,36 @@ includable( true ); + parent::__construct( 'Recentchangeslinked' ); } public function getDefaultOptions() { @@ -52,7 +73,7 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges { } $title = Title::newFromURL( $target ); if( !$title || $title->getInterwiki() != '' ){ - $wgOut->wrapWikiMsg( "
\n$1

", 'allpagesbadtitle' ); + $wgOut->wrapWikiMsg( "
\n$1\n

", 'allpagesbadtitle' ); return false; } @@ -78,7 +99,8 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges { $query_options = array(); // left join with watchlist table to highlight watched rows - if( $uid = $wgUser->getId() ) { + $uid = $wgUser->getId(); + if( $uid ) { $tables[] = 'watchlist'; $select[] = 'wl_user'; $join_conds['watchlist'] = array( 'LEFT JOIN', "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace" ); @@ -88,12 +110,13 @@ 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'] ); - - // XXX: parent class does this, should we too? - // wfRunHooks('SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts ) ); + if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ) ) ) + return false; if( $ns == NS_CATEGORY && !$showlinkedto ) { // special handling for categories -- cgit v1.2.2