return $group;
}
+ /**
+ * Indicates whether this special page may perform database writes
+ *
+ * @return bool
+ * @since 1.27
+ */
+ public function doesWrites() {
+ return false;
+ }
+
/**
* Under which header this special page is listed in Special:SpecialPages
* See messages 'specialpages-group-*' for valid names
* @return bool
*/
public static function executePath( Title &$title, IContextSource &$context, $including = false ) {
-
// @todo FIXME: Redirects broken due to this call
$bits = explode( '/', $title->getDBkey(), 2 );
$name = $bits[0];
} else {
$par = $bits[1];
}
+
$page = self::getPage( $name );
- // Nonexistent?
if ( !$page ) {
$context->getOutput()->setArticleRelated( false );
$context->getOutput()->setRobotPolicy( 'noindex,nofollow' );
return false;
}
+ if ( !$including ) {
+ // Narrow DB query expectations for this HTTP request
+ $trxLimits = $context->getConfig()->get( 'TrxProfilerLimits' );
+ $trxProfiler = Profiler::instance()->getTransactionProfiler();
+ if ( $context->getRequest()->wasPosted() && !$page->doesWrites() ) {
+ $trxProfiler->setExpectations( $trxLimits['POST-nonwrite'], __METHOD__ );
+ }
+ }
+
// Page exists, set the context
$page->setContext( $context );
parent::__construct( 'Block', 'block' );
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* Checks that the user can unblock themselves if they are trying to do so
*
parent::__construct( 'ChangeContentModel', 'editcontentmodel' );
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* @var Title|null
*/
parent::__construct( 'ChangeEmail', 'editmyprivateinfo' );
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* @return bool
*/
$this->listed( false );
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* Main execution point
* @param string|null $par
parent::__construct( 'Confirmemail', 'editmyprivateinfo' );
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* Main execution point
*
);
}
+ public function doesWrites() {
+ return true;
+ }
+
// No reason to hide this link on Special:Specialpages
public function isListed() {
return true;
parent::__construct( 'EditTags', 'changetags' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function execute( $par ) {
$this->checkPermissions();
$this->checkReadOnly();
parent::__construct( 'EditWatchlist', 'editmywatchlist' );
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* Main execution point
*
parent::__construct( 'Invalidateemail', 'editmyprivateinfo' );
}
+ public function doesWrites() {
+ return true;
+ }
+
function execute( $code ) {
// Ignore things like master queries/connections on GET requests.
// It's very convenient to just allow formless link usage.
parent::__construct( 'Emailuser' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function getDescription() {
$target = self::getTarget( $this->mTarget );
if ( !$target instanceof User ) {
parent::__construct( 'Import', 'import' );
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* Execute
* @param string|null $par
parent::__construct( 'Lockdb', 'siteadmin' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function requiresWrite() {
return false;
}
parent::__construct( 'MergeHistory', 'mergehistory' );
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* @return void
*/
parent::__construct( 'Movepage' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function execute( $par ) {
$this->useTransactionalTimeLimit();
parent::__construct( 'PageLanguage', 'pagelang' );
}
+ public function doesWrites() {
+ return true;
+ }
+
protected function preText() {
$this->getOutput()->addModules( 'mediawiki.special.pageLanguage' );
}
parent::__construct( 'PasswordReset', 'editmyprivateinfo' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function userCanExecute( User $user ) {
return $this->canChangePassword( $user ) === true && parent::userCanExecute( $user );
}
parent::__construct( 'Preferences' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function execute( $par ) {
$this->setHeaders();
$this->outputHeader();
parent::__construct( 'ResetTokens' );
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* Returns the token information list for this page after running
* the hook and filtering out disabled preferences.
parent::__construct( 'Revisiondelete', 'deletedhistory' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function execute( $par ) {
$this->useTransactionalTimeLimit();
parent::__construct( 'RunJobs' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function execute( $par = '' ) {
$this->getOutput()->disable();
parent::__construct( 'Unblock', 'block' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function execute( $par ) {
$this->checkPermissions();
$this->checkReadOnly();
$this->config = $config;
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* List all deleted pages recorded in the archive table. Returns result
* wrapper with (ar_namespace, ar_title, count) fields, ordered by page
parent::__construct( 'Unlockdb', 'siteadmin' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function requiresWrite() {
return false;
}
parent::__construct( 'Upload', 'upload' );
}
+ public function doesWrites() {
+ return true;
+ }
+
/** Misc variables **/
/** @var WebRequest|FauxRequest The request this form is supposed to handle */
parent::__construct( 'UploadStash', 'upload' );
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* Execute page -- can output a file directly or show a listing of them.
*
$wgUseMediaWikiUIEverywhere = true;
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* Returns an array of all valid error messages.
*
parent::__construct( 'Userlogout' );
}
+ public function doesWrites() {
+ return true;
+ }
+
function execute( $par ) {
/**
* Some satellite ISPs use broken precaching schemes that log people out straight after
parent::__construct( 'Userrights' );
}
+ public function doesWrites() {
+ return true;
+ }
+
public function isRestricted() {
return true;
}