From: Chad Horohoe Date: Fri, 13 Mar 2009 15:02:28 +0000 (+0000) Subject: (bug 14771) Thumbnail links to individual DjVu pages have two "page" parameters X-Git-Tag: 1.31.0-rc.0~42498 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=49d29b002d89bd082f112988c934f1dd78a09d14;p=lhc%2Fweb%2Fwiklou.git (bug 14771) Thumbnail links to individual DjVu pages have two "page" parameters --- 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' ) );