dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "ApiOptions: set form field parent earlier"
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialEmailuser.php
diff --git
a/includes/specials/SpecialEmailuser.php
b/includes/specials/SpecialEmailuser.php
index
80ef4b1
..
fb1943f
100644
(file)
--- a/
includes/specials/SpecialEmailuser.php
+++ b/
includes/specials/SpecialEmailuser.php
@@
-154,6
+154,10
@@
class SpecialEmailUser extends UnlistedSpecialPage {
$this->mTargetObj = $ret;
$this->mTargetObj = $ret;
+ // Set the 'relevant user' in the skin, so it displays links like Contributions,
+ // User logs, UserRights, etc.
+ $this->getSkin()->setRelevantUser( $this->mTargetObj );
+
$context = new DerivativeContext( $this->getContext() );
$context->setTitle( $this->getPageTitle() ); // Remove subpage
$form = new HTMLForm( $this->getFormFields(), $context );
$context = new DerivativeContext( $this->getContext() );
$context->setTitle( $this->getPageTitle() ); // Remove subpage
$form = new HTMLForm( $this->getFormFields(), $context );
@@
-265,28
+269,32
@@
class SpecialEmailUser extends UnlistedSpecialPage {
*/
protected function userForm( $name ) {
$this->getOutput()->addModules( 'mediawiki.userSuggest' );
*/
protected function userForm( $name ) {
$this->getOutput()->addModules( 'mediawiki.userSuggest' );
- $string =
X
ml::openElement(
- 'form',
- [ 'method' => 'get', 'action' => wfScript(), 'id' => 'askusername' ]
- ) .
+ $string =
Ht
ml::openElement(
+
'form',
+
[ 'method' => 'get', 'action' => wfScript(), 'id' => 'askusername' ]
+
) .
Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) .
Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) .
-
X
ml::openElement( 'fieldset' ) .
+
Ht
ml::openElement( 'fieldset' ) .
Html::rawElement( 'legend', null, $this->msg( 'emailtarget' )->parse() ) .
Html::rawElement( 'legend', null, $this->msg( 'emailtarget' )->parse() ) .
-
Xml::inputL
abel(
+
Html::l
abel(
$this->msg( 'emailusername' )->text(),
$this->msg( 'emailusername' )->text(),
+ 'emailusertarget'
+ ) . ' ' .
+ Html::input(
'target',
'target',
- 'emailusertarget',
- 30,
$name,
$name,
+ 'text',
[
[
+ 'id' => 'emailusertarget',
'class' => 'mw-autocomplete-user', // used by mediawiki.userSuggest
'class' => 'mw-autocomplete-user', // used by mediawiki.userSuggest
- 'autofocus' => '',
+ 'autofocus' => true,
+ 'size' => 30,
]
) .
' ' .
]
) .
' ' .
-
Xml::submitButton( $this->msg( 'emailusernamesubmit' )->text()
) .
-
X
ml::closeElement( 'fieldset' ) .
-
X
ml::closeElement( 'form' ) . "\n";
+
Html::submitButton( $this->msg( 'emailusernamesubmit' )->text(), []
) .
+
Ht
ml::closeElement( 'fieldset' ) .
+
Ht
ml::closeElement( 'form' ) . "\n";
return $string;
}
return $string;
}