diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
commit | 9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch) | |
tree | 46d1a0dee7febef5c2d57a9f7b972be16a163b3d /includes/specials/SpecialRecentchangeslinked.php | |
parent | 78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff) |
update to MediaWiki 1.17.0
Diffstat (limited to 'includes/specials/SpecialRecentchangeslinked.php')
-rw-r--r-- | includes/specials/SpecialRecentchangeslinked.php | 43 |
1 files changed, 33 insertions, 10 deletions
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 @@ <?php +/** + * Implements Special:Recentchangeslinked + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @ingroup SpecialPage + */ /** * This is to display changes made to all articles linked in an article. + * * @ingroup SpecialPage */ -class SpecialRecentchangeslinked extends SpecialRecentchanges { +class SpecialRecentchangeslinked extends SpecialRecentChanges { var $rclTargetTitle; function __construct(){ - SpecialPage::SpecialPage( 'Recentchangeslinked' ); - $this->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( "<div class=\"errorbox\">\n$1</div><br style=\"clear: both\" />", 'allpagesbadtitle' ); + $wgOut->wrapWikiMsg( "<div class=\"errorbox\">\n$1\n</div><br style=\"clear: both\" />", '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 |