From: Happy-melon Date: Sun, 20 Sep 2009 21:24:48 +0000 (+0000) Subject: Follow-ups to r56684: add a member function for extensions to add header text cleanly... X-Git-Tag: 1.31.0-rc.0~39609 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=ecb1cad872e885ddfb85101498a3b28dceb5ac36;p=lhc%2Fweb%2Fwiklou.git Follow-ups to r56684: add a member function for extensions to add header text cleanly, and tweak variable names in api/ApiLogin.php. --- diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index f2a96aa043..45b3604bdc 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -68,8 +68,8 @@ class ApiLogin extends ApiBase { wfSetupSession(); } - $loginForm = new Login( $req ); - switch ( $authRes = $loginForm->attemptLogin() ) { + $login = new Login( $req ); + switch ( $authRes = $login->attemptLogin() ) { case Login::SUCCESS : global $wgUser, $wgCookiePrefix; diff --git a/includes/specials/SpecialCreateAccount.php b/includes/specials/SpecialCreateAccount.php index ccd394c00d..fbc289920c 100644 --- a/includes/specials/SpecialCreateAccount.php +++ b/includes/specials/SpecialCreateAccount.php @@ -502,6 +502,16 @@ class SpecialCreateAccount extends SpecialPage { } } + /** + * Add text to the header. Only write to $mFormHeader directly + * if you're determined to overwrite anything that other + * extensions might have added. + * @param $text String HTML + */ + public function addFormHeader( $text ){ + $this->mFormHeader .= $text; + } + /** * Since the UserCreateForm hook was changed to pass a SpecialPage * instead of a QuickTemplate derivative, old extensions might diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 3a54f0132d..d706a55a6f 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -540,6 +540,16 @@ class SpecialUserLogin extends SpecialPage { return; } } + + /** + * Add text to the header. Only write to $mFormHeader directly + * if you're determined to overwrite anything that other + * extensions might have added. + * @param $text String HTML + */ + public function addFormHeader( $text ){ + $this->mFormHeader .= $text; + } /** * Since the UserLoginForm hook was changed to pass a SpecialPage