/**
  * Main execution point
  * @param string $par
  */
 function execute($par)
 {
     $out = $this->getOutput();
     $out->disallowUserJs();
     $out->addModules('mediawiki.special.changeemail');
     parent::execute($par);
 }
 /**
  * Main execution point
  * @param string $par
  */
 function execute($par)
 {
     $this->checkLoginSecurityLevel();
     $out = $this->getOutput();
     $out->disallowUserJs();
     parent::execute($par);
 }
示例#3
0
 public function execute($par)
 {
     // This is a preferences page, so no user JS for y'all.
     $this->getOutput()->disallowUserJs();
     $this->requireLogin();
     parent::execute($par);
     $this->getOutput()->addReturnTo(SpecialPage::getTitleFor('Preferences'));
 }
示例#4
0
 public function execute($par)
 {
     $user = $this->getUser();
     if (!$this->userCanExecute($user)) {
         throw new \PermissionsError('commentadmin');
     }
     parent::execute($par);
 }
 /**
  * @param string $par
  */
 public function execute($par)
 {
     $output = $this->getContext()->getOutput();
     $output->addModules('ext.CollaborationKit.iconbrowser');
     $output->addModuleStyles('ext.CollaborationKit.iconbrowser.styles');
     $output->addJsConfigVars('wgCollaborationKitIconList', CollaborationKitIcon::getCannedIcons());
     parent::execute($par);
 }
 /**
  * Main method.
  *
  * @since 0.1
  *
  * @param string $subPage
  */
 public function execute($subPage)
 {
     if ($this->getRequest()->getSessionData('epprofilesaved')) {
         $messageKey = $this->getMsgPrefix() . 'profile-saved';
         $this->getOutput()->addHTML('<div class="successbox"><strong><p>' . wfMsgHtml($messageKey) . '</p></strong></div>' . '<hr style="display: block; clear: both; visibility: hidden;" />');
         $this->getRequest()->setSessionData('epprofilesaved', false);
     }
     parent::execute($subPage);
     $this->getOutput()->addModules('ep.ambprofile');
 }
 /**
  * Main execution point
  * @param string|null $par
  */
 function execute($par)
 {
     $this->getOutput()->disallowUserJs();
     $this->requireLogin();
     $par = trim($par);
     if (strlen($par) === 0) {
         $par = null;
     } elseif (strlen($par) > BotPassword::APPID_MAXLENGTH) {
         throw new ErrorPageError('botpasswords', 'botpasswords-bad-appid', [htmlspecialchars($par)]);
     }
     parent::execute($par);
 }
 public function execute($par)
 {
     global $wgCentralAuthEnableUserMerge;
     if (!class_exists('SpecialUserMerge')) {
         $this->setHeaders();
         throw new ErrorPageError('error', 'centralauth-usermerge-notinstalled');
     }
     if (!$wgCentralAuthEnableUserMerge) {
         $this->setHeaders();
         throw new ErrorPageError('error', 'centralauth-usermerge-disabled');
     }
     $this->getOutput()->addModules('ext.centralauth.globalrenameuser');
     parent::execute($par);
 }
 /**
  * @param string $par Subpage string if one was specified
  */
 public function execute($par)
 {
     if (!$this->getUser()->isLoggedIn()) {
         // Require user to be logged in
         $loginpage = SpecialPage::getTitleFor('Userlogin');
         $loginurl = $loginpage->getFullUrl(array('returnto' => $this->getPageTitle()->getPrefixedText()));
         $this->getOutput()->redirect($loginurl);
         return;
     }
     switch ($par) {
         case 'status':
             // Render status page
             $user = $this->getUser();
             $username = $user->getName();
             $wiki = $this->isGlobalUser() ? null : wfWikiID();
             $pending = GlobalRenameRequest::newForUser($username, $wiki);
             if (!$pending->exists()) {
                 $this->getOutput()->redirect(SpecialPage::getTitleFor('GlobalRenameRequest')->getFullURL(), '303');
                 return;
             }
             $out = $this->getOutput();
             $out->setPageTitle($this->msg('globalrenamerequest-status-title'));
             $out->addWikiMsg('globalrenamerequest-status-text', $username, $pending->getNewName());
             break;
         case 'available':
             // TODO: ajax name availability check (bug 70623)
             break;
         default:
             // Request form
             $out = $this->getOutput();
             $user = $this->getUser();
             $wiki = $this->isGlobalUser() ? null : wfWikiID();
             $pending = GlobalRenameRequest::newForUser($user->getName(), $wiki);
             if ($pending->exists()) {
                 $out->redirect($this->getPageTitle('status')->getFullURL(), '303');
                 return;
             }
             $out->addModuleStyles(array('mediawiki.ui', 'mediawiki.ui.button', 'mediawiki.ui.input', 'ext.centralauth.globalrenamerequest.styles'));
             $out->addModules('ext.centralauth.globalrenamerequest');
             parent::execute($par);
             break;
     }
 }
 /**
  * @param string $par Subpage string if one was specified
  */
 public function execute($par)
 {
     parent::execute($par);
     $this->getOutput()->addModules('ext.centralauth.globalrenameuser');
     $this->getOutput()->addModules('ext.centralauth.globaluserautocomplete');
 }
示例#11
0
 /**
  * Main execution point
  * @param string|null $par
  */
 function execute($par)
 {
     $this->getOutput()->disallowUserJs();
     parent::execute($par);
 }
 /**
  * @param $par string
  */
 public function execute($par)
 {
     $out = $this->getContext()->getOutput();
     $out->addModules('ext.CollaborationKit.colour');
     $out->addModuleStyles('ext.CollaborationKit.colourbrowser.styles');
     $out->addJsConfigVars('wgCollaborationKitColourList', CollaborationHubContent::getThemeColours());
     parent::execute($par);
 }