Follow-ups to r56684: add a member function for extensions to add header text cleanly...
authorHappy-melon <happy-melon@users.mediawiki.org>
Sun, 20 Sep 2009 21:24:48 +0000 (21:24 +0000)
committerHappy-melon <happy-melon@users.mediawiki.org>
Sun, 20 Sep 2009 21:24:48 +0000 (21:24 +0000)
includes/api/ApiLogin.php
includes/specials/SpecialCreateAccount.php
includes/specials/SpecialUserlogin.php

index f2a96aa..45b3604 100644 (file)
@@ -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;
 
index ccd394c..fbc2899 100644 (file)
@@ -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
index 3a54f01..d706a55 100644 (file)
@@ -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