From: Brion Vibber Date: Thu, 14 Oct 2004 07:29:12 +0000 (+0000) Subject: XHTML fix, handle bad target more gracefully X-Git-Tag: 1.5.0alpha1~1546 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=6a753c3cd7f134dcc601cc5f29276e12d4c70030;p=lhc%2Fweb%2Fwiklou.git XHTML fix, handle bad target more gracefully --- diff --git a/includes/SpecialEmailuser.php b/includes/SpecialEmailuser.php index 35d3cce509..dbe6532eaa 100644 --- a/includes/SpecialEmailuser.php +++ b/includes/SpecialEmailuser.php @@ -30,6 +30,10 @@ function wfSpecialEmailuser( $par ) { return; } $nt = Title::newFromURL( $target ); + if ( is_null( $nt ) ) { + $wgOut->errorpage( "notargettitle", "notargettext" ); + return; + } $nu = User::newFromName( $nt->getText() ); $id = $nu->idForName(); @@ -96,29 +100,29 @@ class EmailUserForm { if ( "" != $err ) { $wgOut->setSubtitle( wfMsg( "formerror" ) ); - $wgOut->addHTML( "

{$err}\n" ); + $wgOut->addHTML( "

{$err}

\n" ); } - $wgOut->addHTML( "

+ $wgOut->addHTML( "

- - - +
{$emf}:{$sender}
+ + - - + + - - + - - -
{$emf}:{$sender}
{$emt}:{$rcpt}{$emt}:{$rcpt}
{$emr}: - +{$emr}: +
{$emm}: -
  - +  +
\n" );