'Unblock' => 'SpecialUnblock',
'BlockList' => 'SpecialBlockList',
'ChangePassword' => 'SpecialChangePassword',
+ 'BotPasswords' => 'SpecialBotPasswords',
'PasswordReset' => 'SpecialPasswordReset',
'DeletedContributions' => 'DeletedContributionsPage',
'Preferences' => 'SpecialPreferences',
'ResetTokens' => 'SpecialResetTokens',
'Contributions' => 'SpecialContributions',
'Listgrouprights' => 'SpecialListGroupRights',
+ 'Listgrants' => 'SpecialListGrants',
'Listusers' => 'SpecialListUsers',
'Listadmins' => 'SpecialListAdmins',
'Listbots' => 'SpecialListBots',
'Randompage' => 'RandomPage',
'RandomInCategory' => 'SpecialRandomInCategory',
'Randomredirect' => 'SpecialRandomredirect',
+ 'Randomrootpage' => 'SpecialRandomrootpage',
// High use pages
'Mostlinkedcategories' => 'MostlinkedCategoriesPage',
'closure_expansion' => false,
) );
} elseif ( $rec instanceof SpecialPage ) {
- $page = $rec; //XXX: we should deep clone here
+ $page = $rec; // XXX: we should deep clone here
} else {
$page = null;
}
* @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 );