Merge "specials: Declare dynamic properties"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 10 Sep 2019 16:06:06 +0000 (16:06 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 10 Sep 2019 16:06:06 +0000 (16:06 +0000)
includes/specialpage/LoginSignupSpecialPage.php
includes/specials/SpecialLinkSearch.php
includes/specials/SpecialUndelete.php
includes/specials/pagers/ActiveUsersPager.php
includes/specials/pagers/AllMessagesTablePager.php
includes/specials/pagers/MergeHistoryPager.php
includes/specials/pagers/ProtectedTitlesPager.php
includes/specials/pagers/UsersPager.php

index ce80c1a..e5a28d9 100644 (file)
@@ -95,9 +95,8 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
 
        /**
         * Load basic request parameters for this Special page.
-        * @param string $subPage
         */
-       private function loadRequestParameters( $subPage ) {
+       private function loadRequestParameters() {
                if ( $this->mLoadedRequest ) {
                        return;
                }
@@ -105,7 +104,6 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                $request = $this->getRequest();
 
                $this->mPosted = $request->wasPosted();
-               $this->mIsReturn = $subPage === 'return';
                $this->mAction = $request->getVal( 'action' );
                $this->mFromHTTP = $request->getBool( 'fromhttp', false )
                        || $request->getBool( 'wpFromhttp', false );
@@ -124,7 +122,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
        protected function load( $subPage ) {
                global $wgSecureLogin;
 
-               $this->loadRequestParameters( $subPage );
+               $this->loadRequestParameters();
                if ( $this->mLoaded ) {
                        return;
                }
@@ -203,7 +201,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
 
        protected function beforeExecute( $subPage ) {
                // finish initializing the class before processing the request - T135924
-               $this->loadRequestParameters( $subPage );
+               $this->loadRequestParameters();
                return parent::beforeExecute( $subPage );
        }
 
index f2a3f80..60aedda 100644 (file)
@@ -32,6 +32,12 @@ use Wikimedia\Rdbms\IDatabase;
 class SpecialLinkSearch extends QueryPage {
        /** @var array|bool */
        private $mungedQuery = false;
+       /** @var string|null */
+       private $mQuery;
+       /** @var int|null */
+       private $mNs;
+       /** @var string|null */
+       private $mProt;
 
        function setParams( $params ) {
                $this->mQuery = $params['query'];
index 075b5df..fe629db 100644 (file)
@@ -33,18 +33,28 @@ use Wikimedia\Rdbms\IResultWrapper;
  * @ingroup SpecialPage
  */
 class SpecialUndelete extends SpecialPage {
-       private $mAction;
-       private $mTarget;
-       private $mTimestamp;
-       private $mRestore;
-       private $mRevdel;
-       private $mInvert;
-       private $mFilename;
-       private $mTargetTimestamp;
-       private $mAllowed;
-       private $mCanView;
-       private $mComment;
-       private $mToken;
+       private $mAction;
+       private $mTarget;
+       private $mTimestamp;
+       private $mRestore;
+       private $mRevdel;
+       private $mInvert;
+       private $mFilename;
+       private $mTargetTimestamp;
+       private $mAllowed;
+       private $mCanView;
+       private $mComment;
+       private $mToken;
+       /** @var bool|null */
+       private $mPreview;
+       /** @var bool|null */
+       private $mDiff;
+       /** @var bool|null */
+       private $mDiffOnly;
+       /** @var bool|null */
+       private $mUnsuppress;
+       /** @var int[]|null */
+       private $mFileVersions;
 
        /** @var Title */
        private $mTargetObj;
index 0f5355d..0abe842 100644 (file)
@@ -43,6 +43,12 @@ class ActiveUsersPager extends UsersPager {
         */
        private $blockStatusByUid;
 
+       /** @var int */
+       private $RCMaxAge;
+
+       /** @var string[] */
+       private $excludegroups;
+
        /**
         * @param IContextSource|null $context
         * @param FormOptions $opts
index c804b09..6b8b93b 100644 (file)
@@ -46,6 +46,11 @@ class AllMessagesTablePager extends TablePager {
         */
        protected $prefix;
 
+       /**
+        * @var string
+        */
+       protected $suffix;
+
        /**
         * @var Language
         */
index 9415cea..81c3ffb 100644 (file)
@@ -30,10 +30,15 @@ class MergeHistoryPager extends ReverseChronologicalPager {
        /** @var array */
        public $mConds;
 
+       /** @var int */
+       private $articleID;
+
+       /** @var int */
+       private $maxTimestamp;
+
        public function __construct( SpecialMergeHistory $form, $conds, Title $source, Title $dest ) {
                $this->mForm = $form;
                $this->mConds = $conds;
-               $this->title = $source;
                $this->articleID = $source->getArticleID();
 
                $dbr = wfGetDB( DB_REPLICA );
index 296fe11..a00b371 100644 (file)
@@ -34,6 +34,12 @@ class ProtectedTitlesPager extends AlphabeticPager {
         */
        public $mConds;
 
+       /** @var string|null */
+       private $level;
+
+       /** @var int|null */
+       private $namespace;
+
        /**
         * @param SpecialProtectedtitles $form
         * @param array $conds
@@ -50,7 +56,6 @@ class ProtectedTitlesPager extends AlphabeticPager {
                $this->mConds = $conds;
                $this->level = $level;
                $this->namespace = $namespace;
-               $this->size = intval( $size );
                parent::__construct( $form->getContext() );
        }
 
@@ -90,7 +95,7 @@ class ProtectedTitlesPager extends AlphabeticPager {
                        $conds['pt_create_perm'] = $this->level;
                }
 
-               if ( !is_null( $this->namespace ) ) {
+               if ( $this->namespace !== null ) {
                        $conds[] = 'pt_namespace=' . $this->mDb->addQuotes( $this->namespace );
                }
 
index 57b575b..ba078e9 100644 (file)
@@ -37,6 +37,24 @@ class UsersPager extends AlphabeticPager {
         */
        protected $userGroupCache;
 
+       /** @var string */
+       protected $requestedGroup;
+
+       /** @var bool */
+       protected $editsOnly;
+
+       /** @var bool */
+       protected $temporaryGroupsOnly;
+
+       /** @var bool */
+       protected $creationSort;
+
+       /** @var bool|null */
+       protected $including;
+
+       /** @var string */
+       protected $requestedUser;
+
        /**
         * @param IContextSource|null $context
         * @param array|null $par (Default null)