From 8fa160aadb47476f650140bdcc61083f2372b9f7 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Tue, 17 Jul 2012 01:10:01 +0200 Subject: [PATCH] bug 36073 Use mw-imagepage-linkstoimage-ns as a class instead of an ID This avoids multiple defines of the same ID on a File page. Change-Id: I0f8ae37d74f2ec519361b2af164e115f6efa4ac6 --- RELEASE-NOTES-1.20 | 1 + includes/ImagePage.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index daed79ced3..ceb552d473 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -183,6 +183,7 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki. * (bug 37331) ResourceLoader modules sometimes execute twice in Firefox * (bug 31644) GlobalUsage, CentralAuth and AbuseLog extensions should not use insecure links to foreign wikis in the WikiMap. +* (bug 36073) Avoid duplicate element IDs on File pages === API changes in 1.20 === * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API. diff --git a/includes/ImagePage.php b/includes/ImagePage.php index cac407da15..ab3e2e39ba 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -778,7 +778,7 @@ EOT $link2 = Linker::linkKnown( Title::makeTitle( $row->page_namespace, $row->page_title ) ); $ul .= Html::rawElement( 'li', - array( 'id' => 'mw-imagepage-linkstoimage-ns' . $element->page_namespace ), + array( 'class' => 'mw-imagepage-linkstoimage-ns' . $element->page_namespace ), $link2 ) . "\n"; } @@ -788,7 +788,7 @@ EOT } $out->addHTML( Html::rawElement( 'li', - array( 'id' => 'mw-imagepage-linkstoimage-ns' . $element->page_namespace ), + array( 'class' => 'mw-imagepage-linkstoimage-ns' . $element->page_namespace ), $liContents ) . "\n" ); -- 2.20.1