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

Revision: 98638
Author:   reedy
Date:     2011-10-01 22:53:08 +0000 (Sat, 01 Oct 2011)
Log Message:
-----------
Documentation

Fix some incorrect starts of comment blocks

Modified Paths:
--------------
    trunk/extensions/ConfirmAccount/dataclasses/ConfirmAccount.class.php
    trunk/extensions/ConfirmAccount/dataclasses/UserAccountRequest.php
    trunk/extensions/ConfirmAccount/presentation/ConfirmAccountUI.hooks.php
    
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php
    trunk/extensions/ConfirmAccount/schema/ConfirmAccountUpdater.hooks.php

Modified: trunk/extensions/ConfirmAccount/dataclasses/ConfirmAccount.class.php
===================================================================
--- trunk/extensions/ConfirmAccount/dataclasses/ConfirmAccount.class.php        
2011-10-01 22:43:43 UTC (rev 98637)
+++ trunk/extensions/ConfirmAccount/dataclasses/ConfirmAccount.class.php        
2011-10-01 22:53:08 UTC (rev 98638)
@@ -1,8 +1,8 @@
 <?php
 class ConfirmAccount {
-       /*
-       * Move old stale requests to rejected list. Delete old rejected 
requests.
-       */
+       /**
+        * Move old stale requests to rejected list. Delete old rejected 
requests.
+        */
        public static function runAutoMaintenance() {
                global $wgRejectedAccountMaxAge, $wgConfirmAccountFSRepos;
 

Modified: trunk/extensions/ConfirmAccount/dataclasses/UserAccountRequest.php
===================================================================
--- trunk/extensions/ConfirmAccount/dataclasses/UserAccountRequest.php  
2011-10-01 22:43:43 UTC (rev 98637)
+++ trunk/extensions/ConfirmAccount/dataclasses/UserAccountRequest.php  
2011-10-01 22:53:08 UTC (rev 98638)
@@ -27,6 +27,10 @@
 
        private function __construct() {}
 
+       /**
+        * @param $row
+        * @return UserAccountRequest
+        */
        public static function newFromRow( Object $row ) {
                $req = new self();
 
@@ -55,6 +59,10 @@
                return $req;
        }
 
+       /**
+        * @param $fields array
+        * @return UserAccountRequest
+        */
        public static function newFromArray( array $fields ) {
                $req = new self();
 
@@ -100,86 +108,148 @@
                return $req;
        }
 
+       /**
+        * @return int
+        */
        public function getId() {
                return $this->id;
        }
 
+       /**
+        * @return string
+        */
        public function getName() {
                return $this->name;
        }
 
+       /**
+        * @return sting
+        */
        public function getRealName() {
                return $this->realName;
        }
 
+       /**
+        * @return string
+        */
        public function getEmail() {
                return $this->email;
        }
 
+       /**
+        * @return string
+        */
        public function getRegistration() {
                return $this->registration;
        }
 
+       /**
+        * @return string
+        */
        public function getBio() {
                return $this->bio;
        }
 
+       /**
+        * @return string
+        */
        public function getNotes() {
                return $this->notes;
        }
 
+       /**
+        * @return array
+        */
        public function getUrls() {
                return $this->urls;
        }
 
+       /**
+        * @return array
+        */
        public function getAreas() {
                return $this->areas;
        }
 
+       /**
+        * @return string
+        */
        public function getFileName() {
                return $this->fileName;
        }
 
+       /**
+        * @return string
+        */
        public function getFileStorageKey() {
                return $this->fileStorageKey;
        }
 
+       /**
+        * @return string
+        */
        public function getIP() {
                return $this->ip;
        }
 
+       /**
+        * @return string
+        */
        public function getEmailToken() {
                return $this->emailToken;
        }
 
+       /**
+        * @return string
+        */
        public function getEmailTokenExpires() {
                return $this->emailTokenExpires;
        }
 
+       /**
+        * @return string
+        */
        public function getEmailAuthTimestamp() {
                return $this->emailAuthTimestamp;
        }
 
+       /**
+        * @return bool
+        */
        public function isDeleted() {
                return $this->deleted;
        }
 
+       /**
+        * @return string
+        */
        public function getRejectTimestamp() {
                return $this->rejectedTimestamp;
        }
-
+       /**
+        * @return string
+        */
        public function getHeldTimestamp() {
                return $this->heldTimestamp;
        }
 
+       /**
+        * @return User
+        */
        public function getHandlingUser() {
                return $this->user;
        }
 
+       /**
+        * @return string
+        */
        public function getHandlingComment() {
                return $this->comment;
        }
 
+       /**
+        * @return int
+        */
        public function insertOn() {
                $dbw = wfGetDB( DB_MASTER );
                # Allow for some fields to be handled automatically...
@@ -218,6 +288,10 @@
                return $this->id;
        }
 
+       /**
+        * @return bool
+        * @throws MWException
+        */
        public function remove() {
                if ( !$this->id ) {
                        throw new MWException( "Account request ID is not set." 
);

Modified: 
trunk/extensions/ConfirmAccount/presentation/ConfirmAccountUI.hooks.php
===================================================================
--- trunk/extensions/ConfirmAccount/presentation/ConfirmAccountUI.hooks.php     
2011-10-01 22:43:43 UTC (rev 98637)
+++ trunk/extensions/ConfirmAccount/presentation/ConfirmAccountUI.hooks.php     
2011-10-01 22:53:08 UTC (rev 98638)
@@ -3,7 +3,7 @@
  * Class containing hooked functions for a ConfirmAccount environment
  */
 class ConfirmAccountUIHooks {
-       /*
+       /**
         * Register ConfirmAccount special pages as needed.
         * Also sets $wgSpecialPages just to be consistent.
         */
@@ -24,6 +24,10 @@
                return true;
        }
 
+       /**
+        * @param $template
+        * @return bool
+        */
        public static function addRequestLoginText( &$template ) {
                global $wgUser, $wgOut;
                # Add a link to RequestAccount from UserLogin
@@ -34,6 +38,11 @@
                return true;
        }
 
+       /**
+        * @param $personal_urls
+        * @param $title
+        * @return bool
+        */
        public static function setRequestLoginLinks( &$personal_urls, &$title ) 
{
                if ( isset( $personal_urls['anonlogin'] ) ) {
                        $personal_urls['anonlogin']['text'] = 
wfMsg('nav-login-createaccount');
@@ -43,6 +52,11 @@
                return true;
        }
 
+       /**
+        * @param $user User
+        * @param $abortError
+        * @return bool
+        */
        public static function checkIfAccountNameIsPending( User $user, 
&$abortError ) {
                # If an account is made with name X, and one is pending with 
name X
                # we will have problems if the pending one is later confirmed
@@ -57,7 +71,12 @@
                return true;
        }
 
-       // FIXME: don't just take on to general site notice
+       /**
+        * FIXME: don't just take on to general site notice
+        *
+        * @param $notice
+        * @return bool
+        */
        public static function confirmAccountsNotice( &$notice ) {
                global $wgConfirmAccountNotice, $wgUser, $wgMemc, $wgOut;
                if ( !$wgConfirmAccountNotice || !$wgUser->isAllowed( 
'confirmaccount' ) ) {
@@ -100,6 +119,10 @@
                return true;
        }
 
+       /**
+        * @param $admin_links_tree
+        * @return bool
+        */
        public static function confirmAccountAdminLinks( &$admin_links_tree ) {
                $users_section = $admin_links_tree->getSection( wfMsg( 
'adminlinks_users' ) );
                $extensions_row = $users_section->getRow( 'extensions' );

Modified: 
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php
===================================================================
--- 
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php
   2011-10-01 22:43:43 UTC (rev 98637)
+++ 
trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php
   2011-10-01 22:53:08 UTC (rev 98638)
@@ -445,7 +445,7 @@
                if( !$row ) {
                        $out->addHTML( wfMsgHtml('confirmaccount-badid') );
                        $out->returnToMain( true, $titleObj );
-                       return;
+                       return false;
                }
 
                if( $this->submitType === 'reject' || $this->submitType === 
'spam' ) {
@@ -502,7 +502,7 @@
                        $user = User::newFromName( $this->reqUsername, 
'creatable' );
                        if( is_null($user) ) {
                                $this->showAccountConfirmForm( 
wfMsgHtml('noname') );
-                               return;
+                               return false;
                        }
 
                        # Make a random password
@@ -511,7 +511,7 @@
                        # Check if already in use
                        if( 0 != $user->idForName() || $wgAuth->userExists( 
$user->getName() ) ) {
                                $this->showAccountConfirmForm( 
wfMsgHtml('userexists') );
-                               return;
+                               return false;
                        }
                        # Add user to DB
                        $dbw = wfGetDB( DB_MASTER );
@@ -776,6 +776,7 @@
                } else {
                        $this->showAccountConfirmForm();
                }
+               return true;
        }
 
        /*

Modified: trunk/extensions/ConfirmAccount/schema/ConfirmAccountUpdater.hooks.php
===================================================================
--- trunk/extensions/ConfirmAccount/schema/ConfirmAccountUpdater.hooks.php      
2011-10-01 22:43:43 UTC (rev 98637)
+++ trunk/extensions/ConfirmAccount/schema/ConfirmAccountUpdater.hooks.php      
2011-10-01 22:53:08 UTC (rev 98638)
@@ -3,6 +3,11 @@
  * Class containing updater functions for a ConfirmAccount environment
  */
 class ConfirmAccountUpdaterHooks {
+
+       /**
+        * @param DatabaseUpdater $updater
+        * @return bool
+        */
        public static function addSchemaUpdates( DatabaseUpdater $updater ) {
                $base = dirname( __FILE__ );
                if ( $updater->getDB()->getType() == 'mysql' ) {


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to