protected function getPreservedParams($withToken = false)
 {
     global $wgSecureLogin;
     $params = parent::getPreservedParams($withToken);
     $params += ['returnto' => $this->mReturnTo ?: null, 'returntoquery' => $this->mReturnToQuery ?: null];
     if ($wgSecureLogin && !$this->isSignup()) {
         $params['fromhttp'] = $this->mFromHTTP ? '1' : null;
     }
     return $params;
 }
 protected function getAuthForm(array $requests, $action)
 {
     $form = parent::getAuthForm($requests, $action);
     $req = reset($requests);
     $info = $req->describeCredentials();
     $form->addPreText(Html::openElement('dl') . Html::element('dt', [], wfMessage('credentialsform-provider')) . Html::element('dd', [], $info['provider']) . Html::element('dt', [], wfMessage('credentialsform-account')) . Html::element('dd', [], $info['account']) . Html::closeElement('dl'));
     // messages used: changecredentials-submit removecredentials-submit
     // changecredentials-submit-cancel removecredentials-submit-cancel
     $form->setSubmitTextMsg(static::$messagePrefix . '-submit');
     $form->addButton(['name' => 'wpCancel', 'value' => $this->msg(static::$messagePrefix . '-submit-cancel')->text()]);
     return $form;
 }
Ejemplo n.º 3
0
 protected function getAuthForm(array $requests, $action)
 {
     $form = parent::getAuthForm($requests, $action);
     $req = reset($requests);
     $info = $req->describeCredentials();
     $form->addPreText(Html::openElement('dl') . Html::element('dt', [], wfMessage('credentialsform-provider')) . Html::element('dd', [], $info['provider']) . Html::element('dt', [], wfMessage('credentialsform-account')) . Html::element('dd', [], $info['account']) . Html::closeElement('dl'));
     // messages used: changecredentials-submit removecredentials-submit
     $form->setSubmitTextMsg(static::$messagePrefix . '-submit');
     $form->showCancel()->setCancelTarget($this->getReturnUrl() ?: Title::newMainPage());
     return $form;
 }
Ejemplo n.º 4
0
 protected function beforeExecute($subPage)
 {
     // finish initializing the class before processing the request - T135924
     $this->loadRequestParameters($subPage);
     return parent::beforeExecute($subPage);
 }
Ejemplo n.º 5
0
 public function __construct()
 {
     parent::__construct('UnlinkAccounts');
 }
Ejemplo n.º 6
0
 /**
  * @param AuthenticationRequest[] $requests
  * @param string $action AuthManager action name, should be ACTION_LINK or ACTION_LINK_CONTINUE
  * @return HTMLForm
  */
 protected function getAuthForm(array $requests, $action)
 {
     $form = parent::getAuthForm($requests, $action);
     $form->setSubmitTextMsg('linkaccounts-submit');
     return $form;
 }