protected function checkExecutePermissions(User $user) { parent::checkExecutePermissions($user); if (!$this->getRequest()->wasPosted()) { $this->requireLogin('resetpass-no-info'); } }
public function checkExecutePermissions(User $user) { global $wgReadOnly; FormSpecialPage::checkExecutePermissions($user); if (empty($wgReadOnly)) { throw new ErrorPageError('lockdb', 'databasenotlocked'); } }
/** * @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); }
public function checkExecutePermissions(User $user) { parent::checkExecutePermissions($user); # If the lock file isn't writable, we can do sweet bugger all if (!file_exists($this->getConfig()->get('ReadOnlyFile'))) { throw new ErrorPageError('lockdb', 'databasenotlocked'); } }
public function execute($par) { $user = $this->getUser(); if (!$this->userCanExecute($user)) { throw new \PermissionsError('commentadmin'); } parent::execute($par); }
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')); }
public function checkExecutePermissions(User $user) { global $wgReadOnlyFile; parent::checkExecutePermissions($user); # If the lock file isn't writable, we can do sweet bugger all if (!file_exists($wgReadOnlyFile)) { throw new ErrorPageError('lockdb', 'databasenotlocked'); } }
/** * Checks that the user can unblock themselves if they are trying to do so * * @param User $user * @throws ErrorPageError */ protected function checkExecutePermissions(User $user) { parent::checkExecutePermissions($user); # bug 15810: blocked admins should have limited access here $status = self::checkUnblockSelf($this->target, $user); if ($status !== true) { throw new ErrorPageError('badaccess', $status); } }
public function checkExecutePermissions(User $user) { global $wgReadOnlyFile; parent::checkExecutePermissions($user); # If the lock file isn't writable, we can do sweet bugger all if (!is_writable(dirname($wgReadOnlyFile))) { throw new ErrorPageError('lockdb', 'lockfilenotwritable'); } }
protected function checkExecutePermissions(User $user) { parent::checkExecutePermissions($user); if (!$this->getConfig()->get('EnableBotPasswords')) { throw new ErrorPageError('botpasswords', 'botpasswords-disabled'); } $this->userId = CentralIdLookup::factory()->centralIdFromLocalUser($this->getUser()); if (!$this->userId) { throw new ErrorPageError('botpasswords', 'botpasswords-no-central-id'); } }
protected function checkExecutePermissions(User $user) { if (!AuthManager::singleton()->allowsPropertyChange('emailaddress')) { throw new ErrorPageError('changeemail', 'cannotchangeemail'); } $this->requireLogin('changeemail-no-info'); // This could also let someone check the current email address, so // require both permissions. if (!$this->getUser()->isAllowed('viewmyprivateinfo')) { throw new PermissionsError('viewmyprivateinfo'); } parent::checkExecutePermissions($user); }
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; } }
/** * Hide the password reset page if resets are disabled. * @return Bool */ function isListed() { if ($this->canChangePassword($this->getUser()) === true) { return parent::isListed(); } return false; }
public function __construct($name = 'RandomInCategory') { parent::__construct($name); }
public function __construct() { parent::__construct('ChangeContentModel', 'editcontentmodel'); }
/** * @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'); }
/** * Get the Language being used for this instance. * getLang was deprecated in 1.19, getLanguage was introduces in the same version. * * @since 0.2 * * @return Language */ public function getLanguage() { return method_exists(get_parent_class(), 'getLanguage') ? parent::getLanguage() : $this->getLang(); }
/** * (non-PHPdoc) * @see FormSpecialPage::getForm() */ protected function getForm() { $form = parent::getForm(); $form->addButton('cancelEdit', wfMsg('cancel'), 'cancelEdit', array('onclick' => 'window.location="' . SpecialPage::getTitleFor('UploadCampaigns')->getFullURL() . '";return false;')); return $form; }
public function __construct() { parent::__construct('PageLanguage', 'pagelang'); }
function __construct() { parent::__construct('CreateWiki', 'createwiki'); }
protected function getForm() { $form = parent::getForm(); $form->setSubmitTooltip('ep-form-save'); return $form; }
/** * Hide the password reset page if resets are disabled. * @return Bool */ function isListed() { global $wgUser; if ($this->canChangePassword($wgUser) === true) { return parent::isListed(); } return false; }
function __construct() { parent::__construct('GlobalRenameProgress'); }
function __construct() { parent::__construct('Redirect'); $this->mType = null; $this->mValue = null; }
/** * Hide the password reset page if resets are disabled. * @return bool */ public function isListed() { if ($this->passwordReset->isAllowed($this->getUser())->isGood()) { return parent::isListed(); } return false; }
/** * @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); }