From f6f15889bf0deb73eb6dc93d2018fa5b7a7f1230 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 24 Apr 2004 07:02:27 +0000 Subject: [PATCH] Allow forgotten Special:Emailuser/Username link style to work (handy for inline linking from wiki pages). Fixes bug #939512 --- includes/SpecialEmailuser.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/SpecialEmailuser.php b/includes/SpecialEmailuser.php index 2d9645dec0..11e6a63284 100644 --- a/includes/SpecialEmailuser.php +++ b/includes/SpecialEmailuser.php @@ -2,8 +2,7 @@ require_once('UserMailer.php'); -function wfSpecialEmailuser() -{ +function wfSpecialEmailuser( $par ) { global $wgUser, $wgOut, $wgRequest; if ( 0 == $wgUser->getID() || @@ -11,8 +10,13 @@ function wfSpecialEmailuser() $wgOut->errorpage( "mailnologin", "mailnologintext" ); return; } + $action = $wgRequest->getVal( 'action' ); - $target = $wgRequest->getVal( 'target' ); + if( empty( $par ) ) { + $target = $wgRequest->getVal( 'target' ); + } else { + $target = $par; + } if ( "" == $target ) { $wgOut->errorpage( "notargettitle", "notargettext" ); return; -- 2.20.1