From 454cec74a10887663c4cc099f5654676110bc7cd Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Sat, 19 Apr 2008 16:46:45 +0000 Subject: [PATCH] * (bug 13793) Special:Whatlinkshere filters wrong - after paginating instead of before --- RELEASE-NOTES | 2 +- includes/SpecialWhatlinkshere.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index af5c2503e8..cdb80f5599 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -206,7 +206,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Do not display empty columns on Special:UserRights if all groups are changeable or all unchangeable * Fix fatal error on calling PAGESINCATEGORY with invalid category name - +* (bug 13793) Special:Whatlinkshere filters wrong - after paginating instead of before === API changes in 1.13 === diff --git a/includes/SpecialWhatlinkshere.php b/includes/SpecialWhatlinkshere.php index e3bb530b84..4441507cb0 100644 --- a/includes/SpecialWhatlinkshere.php +++ b/includes/SpecialWhatlinkshere.php @@ -99,6 +99,11 @@ class WhatLinksHerePage { 'pl_namespace' => $target->getNamespace(), 'pl_title' => $target->getDBkey(), ); + if( $this->hideredirs ) { + $plConds['page_is_redirect'] = 0; + } elseif( $this->hidelinks ) { + $plConds['page_is_redirect'] = 1; + } $tlConds = array( 'page_id=tl_from', @@ -220,11 +225,6 @@ class WhatLinksHerePage { $wgOut->addHTML( $this->listStart() ); foreach ( $rows as $row ) { - if( $this->hideredirs && $row->page_is_redirect ) - continue; - if( $this->hidelinks && ( !$row->page_is_redirect && !$row->is_template ) ) - continue; - $nt = Title::makeTitle( $row->page_namespace, $row->page_title ); $wgOut->addHTML( $this->listItem( $row, $nt ) ); -- 2.20.1