protected $mEntryErrorType = 'error';
protected $mLoaded = false;
+ protected $mLoadedRequest = false;
protected $mSecureLoginUrl;
/** @var string */
$wgUseMediaWikiUIEverywhere = true;
}
+ protected function setRequest( array $data, $wasPosted = null ) {
+ parent::setRequest( $data, $wasPosted );
+ $this->mLoadedRequest = false;
+ }
+
/**
- * Load data from request.
- * @private
- * @param string $subPage Subpage of Special:Userlogin
+ * Load basic request parameters for this Special page.
+ * @param $subPage
*/
- protected function load( $subPage ) {
- global $wgSecureLogin;
-
- if ( $this->mLoaded ) {
+ private function loadRequestParameters( $subPage ) {
+ if ( $this->mLoadedRequest ) {
return;
}
- $this->mLoaded = true;
-
+ $this->mLoadedRequest = true;
$request = $this->getRequest();
$this->mPosted = $request->wasPosted();
$this->mLanguage = $request->getText( 'uselang' );
$this->mReturnTo = $request->getVal( 'returnto', '' );
$this->mReturnToQuery = $request->getVal( 'returntoquery', '' );
+ }
+
+ /**
+ * Load data from request.
+ * @private
+ * @param string $subPage Subpage of Special:Userlogin
+ */
+ protected function load( $subPage ) {
+ global $wgSecureLogin;
+
+ $this->loadRequestParameters( $subPage );
+ if ( $this->mLoaded ) {
+ return;
+ }
+ $this->mLoaded = true;
+ $request = $this->getRequest();
$securityLevel = $this->getRequest()->getText( 'force' );
if (
return $params;
}
+ protected function beforeExecute( $subPage ) {
+ // finish initializing the class before processing the request - T135924
+ $this->loadRequestParameters( $subPage );
+ return parent::beforeExecute( $subPage );
+ }
+
/**
* @param string|null $subPage
*/