From 2a9021ff7cbec3d58c0ef31e03537f66de985f1c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 11 Feb 2005 10:08:41 +0000 Subject: [PATCH] * XHTML fix: encoding of usernames * Removed unused error message display --- includes/SpecialEmailuser.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/includes/SpecialEmailuser.php b/includes/SpecialEmailuser.php index 860d25b7f4..92b938e350 100644 --- a/includes/SpecialEmailuser.php +++ b/includes/SpecialEmailuser.php @@ -59,7 +59,7 @@ function wfSpecialEmailuser( $par ) { if ( "success" == $action ) { $f->showSuccess(); } else if ( "submit" == $action && $wgRequest->wasPosted() ) { $f->doSubmit(); } - else { $f->showForm( "" ); } + else { $f->showForm(); } } /** @@ -81,7 +81,7 @@ class EmailUserForm { $this->subject = $wgRequest->getText( 'wpSubject' ); } - function showForm( $err ) { + function showForm() { global $wgOut, $wgUser, $wgLang; $wgOut->setPagetitle( wfMsg( "emailpage" ) ); @@ -101,20 +101,17 @@ class EmailUserForm { $encSubject = htmlspecialchars( $this->subject ); $titleObj = Title::makeTitle( NS_SPECIAL, "Emailuser" ); - $action = $titleObj->escapeLocalURL( "target={$this->target}&action=submit" ); + $action = $titleObj->escapeLocalURL( "target=" . + urlencode( $this->target ) . "&action=submit" ); - if ( "" != $err ) { - $wgOut->setSubtitle( wfMsg( "formerror" ) ); - $wgOut->addHTML( "

{$err}

\n" ); - } $wgOut->addHTML( "
- + - +
{$emf}:{$sender}" . htmlspecialchars( $sender ) . "
{$emt}:{$rcpt}" . htmlspecialchars( $rcpt ) . "
{$emr}: -- 2.20.1