From ca5e64614e40b5fe5b93ef521941feaaf94e79bb Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 12 Jul 2007 15:41:57 +0000 Subject: [PATCH] * Fix for Esperanto double-x-encoding in move success page --- RELEASE-NOTES | 2 ++ includes/SpecialMovepage.php | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 38072c27e2..df48151c9a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 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 == diff --git a/includes/SpecialMovepage.php b/includes/SpecialMovepage.php index 555877bb48..e318bc6354 100644 --- a/includes/SpecialMovepage.php +++ b/includes/SpecialMovepage.php @@ -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(); -- 2.20.1