* Fix for Esperanto double-x-encoding in move success page
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 12 Jul 2007 15:41:57 +0000 (15:41 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 12 Jul 2007 15:41:57 +0000 (15:41 +0000)
RELEASE-NOTES
includes/SpecialMovepage.php

index 38072c2..df48151 100644 (file)
@@ -279,6 +279,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 10332) Title->userCan( 'edit' ) may return false positive
 * Fix bug with <nowiki> in front of links for wikis where linkPrefixExtension is true
 * (bug 10552) Suppress rollback link in history for single-revision pages
+* (bug 10538) Gracefully handle invalid input on move success page
+* Fix for Esperanto double-x-encoding in move success page
 
 
 == API changes since 1.10 ==
index 555877b..e318bc6 100644 (file)
@@ -268,11 +268,16 @@ class MovePageForm {
        function showSuccess() {
                global $wgOut, $wgRequest, $wgUser, $wgRawHtml;
                
+               $old = Title::newFromText( $wgRequest->getVal( 'oldtitle' ) );
+               $new = Title::newFromText( $wgRequest->getVal( 'newtitle' ) );
+               
+               if( is_null( $old ) || is_null( $new ) ) {
+                       throw new ErrorPageError( 'badtitle', 'badtitletext' );
+               }
+               
                $wgOut->setPagetitle( wfMsg( 'movepage' ) );
                $wgOut->setSubtitle( wfMsg( 'pagemovedsub' ) );
 
-               $old = Title::newFromText( $wgRequest->getText( 'oldtitle' ) );
-               $new = Title::newFromText( $wgRequest->getText( 'newtitle' ) );
                $talkmoved = $wgRequest->getVal( 'talkmoved' );
                $oldUrl = $old->getFullUrl( 'redirect=no' );
                $newUrl = $new->getFullURl();