From: Aaron Schulz Date: Tue, 9 Aug 2011 18:30:09 +0000 (+0000) Subject: Follow-up r92065: call userForm dynamically. Also made userForm protected as no one... X-Git-Tag: 1.31.0-rc.0~28381 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=f5e6458a49b9ea3776692d403b8cbfd404ca707c;p=lhc%2Fweb%2Fwiklou.git Follow-up r92065: call userForm dynamically. Also made userForm protected as no one else calls it and it's not static anymore. --- diff --git a/includes/specials/SpecialEmailuser.php b/includes/specials/SpecialEmailuser.php index 52501e4948..7aa3c7505b 100644 --- a/includes/specials/SpecialEmailuser.php +++ b/includes/specials/SpecialEmailuser.php @@ -117,7 +117,7 @@ class SpecialEmailUser extends UnlistedSpecialPage { $ret = ( $ret == 'notarget' ) ? 'emailnotarget' : ( $ret . 'text' ); $out->addHTML( '

' . wfMessage( $ret )->parse() . '

' ); } - $out->addHTML( self::userForm( $this->mTarget ) ); + $out->addHTML( $this->userForm( $this->mTarget ) ); return false; } @@ -219,17 +219,16 @@ class SpecialEmailUser extends UnlistedSpecialPage { * @param $name String: user name submitted. * @return String: form asking for user name. */ - - function userForm( $name ) { - global $wgScript ; + protected function userForm( $name ) { + global $wgScript; $string = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'askusername' ) ) . - Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . - Xml::openElement( 'fieldset' ) . - Html::rawElement( 'legend', null, wfMessage( 'emailtarget' )->parse() ) . - Xml::inputLabel( wfMessage( 'emailusername' )->text(), 'target', 'emailusertarget', 30, $name ) . ' ' . - Xml::submitButton( wfMessage( 'emailusernamesubmit' )->text() ) . - Xml::closeElement( 'fieldset' ) . - Xml::closeElement( 'form' ) . "\n"; + Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . + Xml::openElement( 'fieldset' ) . + Html::rawElement( 'legend', null, wfMessage( 'emailtarget' )->parse() ) . + Xml::inputLabel( wfMessage( 'emailusername' )->text(), 'target', 'emailusertarget', 30, $name ) . ' ' . + Xml::submitButton( wfMessage( 'emailusernamesubmit' )->text() ) . + Xml::closeElement( 'fieldset' ) . + Xml::closeElement( 'form' ) . "\n"; return $string; }