From 49d29b002d89bd082f112988c934f1dd78a09d14 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 13 Mar 2009 15:02:28 +0000 Subject: [PATCH] (bug 14771) Thumbnail links to individual DjVu pages have two "page" parameters --- RELEASE-NOTES | 2 ++ includes/Linker.php | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 170eefec6d..61c5f5938d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -263,6 +263,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 17778) MediaWiki:Catseparator can now have HTML entities * (bug 17676) Error on Special:ListFiles when using Postgres * Special:Export doesn't use raw SQL queries anymore +* (bug 14771) Thumbnail links to individual DjVu pages have two no longer have + two "page" parameters == API changes in 1.15 == diff --git a/includes/Linker.php b/includes/Linker.php index c9d4db1210..b739244b3b 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -882,10 +882,13 @@ class Linker { } } - if( $page ) { - $query = $query ? '&page=' . urlencode( $page ) : 'page=' . urlencode( $page ); - } + # ThumbnailImage::toHtml() already adds page= onto the end of DjVu URLs + # So we don't need to pass it here in $query. However, the URL for the + # zoom icon still needs it, so we make a unique query for it. See bug 14771 $url = $title->getLocalURL( $query ); + if( $page ) { + $url = wfAppendQuery( $url, 'page=' . urlencode( $page ) ); + } $more = htmlspecialchars( wfMsg( 'thumbnail-more' ) ); -- 2.20.1