From 0e38c2cdce5eb1908620ab5122f122b4c1b37d8c Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 7 Mar 2011 14:45:11 +0000 Subject: [PATCH] Documentation and explicit variable definitions Followup r80069, swap private to protected --- includes/HTMLCacheUpdate.php | 7 ++++++- includes/HTMLFileCache.php | 7 ++++++- includes/User.php | 18 ++++++++++++------ includes/api/ApiQueryAllimages.php | 2 +- includes/specials/SpecialUserlogin.php | 10 +++++++++- 5 files changed, 34 insertions(+), 10 deletions(-) diff --git a/includes/HTMLCacheUpdate.php b/includes/HTMLCacheUpdate.php index 594b85c145..d571d94992 100644 --- a/includes/HTMLCacheUpdate.php +++ b/includes/HTMLCacheUpdate.php @@ -25,7 +25,12 @@ */ class HTMLCacheUpdate { - public $mTitle, $mTable, $mPrefix, $mStart, $mEnd; + /** + * @var Title + */ + public $mTitle; + + public $mTable, $mPrefix, $mStart, $mEnd; public $mRowsPerJob, $mRowsPerQuery; function __construct( $titleTo, $table, $start = false, $end = false ) { diff --git a/includes/HTMLFileCache.php b/includes/HTMLFileCache.php index 26cb147dd9..20224b0633 100644 --- a/includes/HTMLFileCache.php +++ b/includes/HTMLFileCache.php @@ -20,7 +20,12 @@ * @ingroup Cache */ class HTMLFileCache { - var $mTitle, $mFileCache, $mType; + + /** + * @var Title + */ + var $mTitle; + var $mFileCache, $mType; public function __construct( &$title, $type = 'view' ) { $this->mTitle = $title; diff --git a/includes/User.php b/includes/User.php index 4ddc841fcb..892de83304 100644 --- a/includes/User.php +++ b/includes/User.php @@ -173,10 +173,20 @@ class User { /** * Lazy-initialized variables, invalidated with clearInstanceCache */ - var $mNewtalk, $mDatePreference, $mBlockedby, $mHash, $mSkin, $mRights, - $mBlockreason, $mBlock, $mEffectiveGroups, $mBlockedGlobally, + var $mNewtalk, $mDatePreference, $mBlockedby, $mHash, $mRights, + $mBlockreason, $mEffectiveGroups, $mBlockedGlobally, $mLocked, $mHideName, $mOptions; + /** + * @var Skin + */ + var $mSkin; + + /** + * @var Block + */ + var $mBlock; + static $idCacheByName = array(); /** @@ -3774,8 +3784,4 @@ class User { return $ret; } - - - - } diff --git a/includes/api/ApiQueryAllimages.php b/includes/api/ApiQueryAllimages.php index e68bc917e9..89cc9db829 100644 --- a/includes/api/ApiQueryAllimages.php +++ b/includes/api/ApiQueryAllimages.php @@ -38,7 +38,7 @@ if ( !defined( 'MEDIAWIKI' ) ) { */ class ApiQueryAllimages extends ApiQueryGeneratorBase { - private $mRepo; + protected $mRepo; public function __construct( $query, $moduleName ) { parent::__construct( $query, $moduleName, 'ai' ); diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index a82e25dff9..461817a29b 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -47,10 +47,17 @@ class LoginForm extends SpecialPage { var $mAction, $mCreateaccount, $mCreateaccountMail, $mMailmypassword; var $mLoginattempt, $mRemember, $mEmail, $mDomain, $mLanguage; var $mSkipCookieCheck, $mReturnToQuery, $mToken, $mStickHTTPS; + var $mType, $mReason, $mRealName; var $mAbortLoginErrorMsg = 'login-abort-generic'; + /** + * @var ExternalUser + */ private $mExtUser = null; + /** + * @param WebRequest $request + */ public function __construct( $request = null ) { parent::__construct( 'Userlogin' ); @@ -261,7 +268,8 @@ class LoginForm extends SpecialPage { // create a local account and login as any domain user). We only need // to check this for domains that aren't local. if( 'local' != $this->mDomain && $this->mDomain != '' ) { - if( !$wgAuth->canCreateAccounts() && ( !$wgAuth->userExists( $this->mUsername ) || !$wgAuth->authenticate( $this->mUsername, $this->mPassword ) ) ) { + if( !$wgAuth->canCreateAccounts() && ( !$wgAuth->userExists( $this->mUsername ) + || !$wgAuth->authenticate( $this->mUsername, $this->mPassword ) ) ) { $this->mainLoginForm( wfMsg( 'wrongpassword' ) ); return false; } -- 2.20.1