From 3aec1c90bd0303ae4b9f01dfbf07eb9ac8a48e2e Mon Sep 17 00:00:00 2001 From: Ilmari Karonen Date: Sun, 6 Feb 2011 18:25:08 +0000 Subject: [PATCH] (bug 27201) fix duplicate IDs in recursive whatlinkshere output --- RELEASE-NOTES | 1 + includes/specials/SpecialWhatlinkshere.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8035d7460e..1c92c80e62 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -145,6 +145,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 24650) Fix API to work with categorylinks changes * Expose list of skins in meta=siteinfo * (bug 26548) Add iiurlparam param to query=imageinfo and query=stashimageinfo +* (bug 27201) Special:WhatLinksHere output no longer contains duplicate IDs === Languages updated in 1.18 === diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index e0a5d34d0b..276d9760d2 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -239,7 +239,7 @@ class SpecialWhatLinksHere extends SpecialPage { $wgOut->addHTML( $prevnext ); } - $wgOut->addHTML( $this->listStart() ); + $wgOut->addHTML( $this->listStart( $level ) ); foreach ( $rows as $row ) { $nt = Title::makeTitle( $row->page_namespace, $row->page_title ); @@ -259,8 +259,8 @@ class SpecialWhatLinksHere extends SpecialPage { } } - protected function listStart() { - return Xml::openElement( 'ul', array ( 'id' => 'mw-whatlinkshere-list' ) ); + protected function listStart( $level ) { + return Xml::openElement( 'ul', ( $level ? array() : array( 'id' => 'mw-whatlinkshere-list' ) ) ); } protected function listItem( $row, $nt, $notClose = false ) { -- 2.20.1