* Fix multipage selector drop-down for DjVu images to work when title
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 26 Jan 2007 12:10:06 +0000 (12:10 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 26 Jan 2007 12:10:06 +0000 (12:10 +0000)
  is passed as a query string parameter; we have to pass the title as
  a form parameter or it gets dropped from the form submission URL

RELEASE-NOTES
includes/ImagePage.php

index 7166b7b..120f9c5 100644 (file)
@@ -151,6 +151,9 @@ lighter making things easier to read.
 * (bug 8780) Clarify message for command-line scripts if LocalSettings.php exists but is not readable
 * (bug 8777) Suppress 'previous' link on Special:Allpages when at first page
 * (bug 8774) Fix path for GNU FDL rights icon on new installs
+* Fix multipage selector drop-down for DjVu images to work when title
+  is passed as a query string parameter; we have to pass the title as
+  a form parameter or it gets dropped from the form submission URL
 
 
 == Languages updated ==
index 2e6e94e..fda8f13 100644 (file)
@@ -268,7 +268,11 @@ class ImagePage extends Article {
                                                $thumb2 = '';
                                        }
 
-                                       $select = '<form name="pageselector" action="' . $this->img->getEscapeLocalUrl( '' ) . '" method="GET" onchange="document.pageselector.submit();">' ;
+                                       global $wgScript;
+                                       $select = '<form name="pageselector" action="' . 
+                                               htmlspecialchars( $wgScript ) .
+                                               '" method="get" onchange="document.pageselector.submit();">' .
+                                               Xml::hidden( 'title', $this->getTitle()->getPrefixedDbKey() );
                                        $select .= $wgOut->parse( wfMsg( 'imgmultigotopre' ), false ) .
                                                ' <select id="pageselector" name="page">';
                                        for ( $i=1; $i <= $count; $i++ ) {