http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90786

Revision: 90786
Author:   reedy
Date:     2011-06-25 19:23:39 +0000 (Sat, 25 Jun 2011)
Log Message:
-----------
Fixup a couple of minor syntax errors

Fix encoding of copyright symbol

Add a few missing global calls

Modified Paths:
--------------
    trunk/extensions/SignupAPI/SignupAPI.php
    trunk/extensions/SignupAPI/includes/APISignup.php
    trunk/extensions/SignupAPI/includes/SpecialUserSignup.php

Modified: trunk/extensions/SignupAPI/SignupAPI.php
===================================================================
--- trunk/extensions/SignupAPI/SignupAPI.php    2011-06-25 19:17:15 UTC (rev 
90785)
+++ trunk/extensions/SignupAPI/SignupAPI.php    2011-06-25 19:23:39 UTC (rev 
90786)
@@ -6,7 +6,7 @@
  * @file
  * @ingroup Extensions
  * @author Akshay Agarwal, akshayagarwal.in
- * @copyright \xA9 2011 Akshay Agarwal
+ * @copyright © 2011 Akshay Agarwal
  * @licence GNU General Public Licence 2.0 or later
  */
 

Modified: trunk/extensions/SignupAPI/includes/APISignup.php
===================================================================
--- trunk/extensions/SignupAPI/includes/APISignup.php   2011-06-25 19:17:15 UTC 
(rev 90785)
+++ trunk/extensions/SignupAPI/includes/APISignup.php   2011-06-25 19:23:39 UTC 
(rev 90786)
@@ -96,7 +96,7 @@
                        
                        case SignupForm::IP_BLOCKED:
                                $result['result'] = 'IPBlocked';
-                               break:
+                               break;
                        
                        case SignupForm::NO_NAME:
                                $result['result'] = 'NoName';

Modified: trunk/extensions/SignupAPI/includes/SpecialUserSignup.php
===================================================================
--- trunk/extensions/SignupAPI/includes/SpecialUserSignup.php   2011-06-25 
19:17:15 UTC (rev 90785)
+++ trunk/extensions/SignupAPI/includes/SpecialUserSignup.php   2011-06-25 
19:23:39 UTC (rev 90786)
@@ -153,14 +153,13 @@
        //Used for mailing password reset request
        function addNewAccountMailPassword() {
                global $wgOut;
-               
+
                //check if no email id was provided
                if ( $this->mEmail == '' ) {
                        $this->mainSignupForm( wfMsgExt( 'noemail', array( 
'parsemag', 'escape' ), $this->mUsername ) );
                        return;
                }
-               
-               
+
                $mUser = $this->addNewaccountInternal();
 
                if ( $mUser == null ) {
@@ -344,6 +343,7 @@
                $mUser->setEmail( $this->mEmail );
                $mUser->setRealName( $this->mRealName );
 
+               $abortError = '';
                if( !wfRunHooks( 'AbortNewAccount', array( $mUser, &$abortError 
) ) ) {
                        // Hook point to add extra creation throttles and blocks
                        return self::BLOCKED_BY_HOOK;
@@ -380,7 +380,7 @@
         * @return User object.
         * @private
         */
-       function initUser( $mUser, $autocreate ) {
+       function initUser( $mUser, $autocreate = false ) {
                global $wgAuth;
 
                $mUser->addToDatabase();
@@ -415,7 +415,7 @@
 
        
        function processSignup() {
-               global $wgUser;
+               global $wgUser, $wgOut;
                
                switch ( $this->addNewAccountInternal() ) {
                        case self::SUCCESS:
@@ -457,11 +457,12 @@
                                break;
                        case self::INVALID_PASS:
                                if ( is_array( $valid ) ) {
-                               $message = array_shift( $valid );
-                               $params = $valid;
+                                       $message = array_shift( $valid );
+                                       $params = $valid;
                                } else {
-                               $message = $valid;
-                               $params = array( $wgMinimalPasswordLength );
+                                       global $wgMinimalPasswordLength;
+                                       $message = $valid;
+                                       $params = array( 
$wgMinimalPasswordLength );
                                }
                                $this->mainSignupForm( wfMsgExt( $message, 
array( 'parsemag' ), $params ) );
                                break;
@@ -479,6 +480,7 @@
                                $this->mainSignupForm( wfMsg( 'externaldberror' 
) );
                                break;
                        case self::THROTLLED;
+                               global $wgAccountCreationThrottle;
                                $this->mainSignupForm( wfMsgExt( 
'acct_creation_throttle_hit', array( 'parseinline' ), 
$wgAccountCreationThrottle ) );
                                break;
                        default:


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to