require __DIR__ . '/includes/WebStart.php';
-wfProfileIn( 'api.php' );
$starttime = microtime( true );
// URL safety checks
// Log what the user did, for book-keeping purposes.
$endtime = microtime( true );
-wfProfileOut( 'api.php' );
wfLogProfilingData();
define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
require __DIR__ . '/includes/WebStart.php';
-wfProfileIn( 'img_auth.php' );
# Set action base paths so that WebRequest::getPathInfo()
# recognizes the "X" as the 'title' in ../img_auth.php/X urls.
$wgActionPaths = array( "$wgUploadPath/" );
wfImageAuthMain();
-wfProfileOut( 'img_auth.php' );
wfLogProfilingData();
// Commit and close up!
$factory = wfGetLBFactory();
return;
}
- wfProfileIn( __METHOD__ . "-business-end" );
$this->isConflict = false;
// css / js subpages of user pages get a special treatment
if ( 'save' == $this->formtype ) {
if ( !$this->attemptSave() ) {
- wfProfileOut( __METHOD__ . "-business-end" );
return;
}
}
if ( 'initial' == $this->formtype || $this->firsttime ) {
if ( $this->initialiseForm() === false ) {
$this->noSuchSectionPage();
- wfProfileOut( __METHOD__ . "-business-end" );
return;
}
}
$this->showEditForm();
- wfProfileOut( __METHOD__ . "-business-end" );
}
/**
// Skip this if wpTextbox2 has input, it indicates that we came
// from a conflict page with raw page text, not a custom form
// modified by subclasses
- wfProfileIn( get_class( $this ) . "::importContentFormData" );
$textbox1 = $this->importContentFormData( $request );
if ( $textbox1 !== null ) {
$this->textbox1 = $textbox1;
}
-
- wfProfileOut( get_class( $this ) . "::importContentFormData" );
}
# Truncate for whole multibyte characters
$status = Status::newGood();
- wfProfileIn( __METHOD__ . '-checks' );
if ( !Hooks::run( 'EditPage::attemptSave', array( $this ) ) ) {
wfDebug( "Hook 'EditPage::attemptSave' aborted article saving\n" );
$status->fatal( 'hookaborted' );
$status->value = self::AS_HOOK_ERROR;
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
);
$status->fatal( 'spamprotectionmatch', false );
$status->value = self::AS_SPAM_ERROR;
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
$ex->getMessage()
);
$status->value = self::AS_PARSE_ERROR;
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
$code = $wgUser->isAnon() ? self::AS_IMAGE_REDIRECT_ANON : self::AS_IMAGE_REDIRECT_LOGGED;
$status->setResult( false, $code );
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
wfDebugLog( 'SpamRegex', "$ip spam regex hit [[$pdbk]]: \"$match\"" );
$status->fatal( 'spamprotectionmatch', $match );
$status->value = self::AS_SPAM_ERROR;
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
if ( !Hooks::run(
# Error messages etc. could be handled within the hook...
$status->fatal( 'hookaborted' );
$status->value = self::AS_HOOK_ERROR;
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
} elseif ( $this->hookError != '' ) {
# ...or the hook could be expecting us to produce an error
$status->fatal( 'hookaborted' );
$status->value = self::AS_HOOK_ERROR_EXPECTED;
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
$wgUser->spreadAnyEditBlock();
# Check block state against master, thus 'false'.
$status->setResult( false, self::AS_BLOCKED_PAGE_FOR_USER );
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
// Error will be displayed by showEditForm()
$this->tooBig = true;
$status->setResult( false, self::AS_CONTENT_TOO_BIG );
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
if ( !$wgUser->isAllowed( 'edit' ) ) {
if ( $wgUser->isAnon() ) {
$status->setResult( false, self::AS_READ_ONLY_PAGE_ANON );
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
} else {
$status->fatal( 'readonlytext' );
$status->value = self::AS_READ_ONLY_PAGE_LOGGED;
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
}
&& !$wgUser->isAllowed( 'editcontentmodel' )
) {
$status->setResult( false, self::AS_NO_CHANGE_CONTENT_MODEL );
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
if ( wfReadOnly() ) {
$status->fatal( 'readonlytext' );
$status->value = self::AS_READ_ONLY_PAGE;
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
if ( $wgUser->pingLimiter() || $wgUser->pingLimiter( 'linkpurge', 0 ) ) {
$status->fatal( 'actionthrottledtext' );
$status->value = self::AS_RATE_LIMITED;
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
# confirmation
if ( $this->wasDeletedSinceLastEdit() && !$this->recreate ) {
$status->setResult( false, self::AS_ARTICLE_WAS_DELETED );
- wfProfileOut( __METHOD__ . '-checks' );
return $status;
}
- wfProfileOut( __METHOD__ . '-checks' );
# Load the page data from the master. If anything changes in the meantime,
# we detect it by using page_latest like a token in a 1 try compare-and-swap.
}
# All's well
- wfProfileIn( __METHOD__ . '-sectionanchor' );
$sectionanchor = '';
if ( $this->section == 'new' ) {
$this->summary = $this->newSectionSummary( $sectionanchor );
}
}
$result['sectionanchor'] = $sectionanchor;
- wfProfileOut( __METHOD__ . '-sectionanchor' );
// Save errors may fall down to the edit form, but we've now
// merged the section into full text. Clear the section field
}
if ( $oldid ) {
- wfProfileIn( __METHOD__ . "-dodiff" );
#$diffText = $de->getDiff( wfMessage( 'revisionasof',
# $wgLang->timeanddate( $timestamp ),
$diffText = UtfNormal::cleanUp( $diffText );
$diffText = self::applyDiffStyle( $diffText );
}
- wfProfileOut( __METHOD__ . "-dodiff" );
} else {
$rev = Revision::newFromId( $newid );
if ( $wgFeedDiffCutoff <= 0 || is_null( $rev ) ) {
public function getText( $element = null ) {
if ( $this->doc ) {
- wfProfileIn( __METHOD__ . '-dom' );
if ( $element !== null && !( $element instanceof DOMElement ) ) {
$element = $this->doc->getElementById( $element );
}
$body->appendChild( $element );
}
$html = $this->doc->saveHTML();
- wfProfileOut( __METHOD__ . '-dom' );
- wfProfileIn( __METHOD__ . '-fixes' );
$html = $this->fixLibXml( $html );
if ( wfIsWindows() ) {
// Cleanup for CRLF misprocessing of unknown origin on Windows.
// XML code paths if possible and fix there.
$html = str_replace( ' ', '', $html );
}
- wfProfileOut( __METHOD__ . '-fixes' );
} else {
$html = $this->html;
}
$html = preg_replace( '/<!--.*?-->|^.*?<body>|<\/body>.*$/s', '', $html );
$html = $this->onHtmlReady( $html );
- wfProfileIn( __METHOD__ . '-flatten' );
if ( $this->elementsToFlatten ) {
$elements = implode( '|', $this->elementsToFlatten );
$html = preg_replace( "#</?($elements)\\b[^>]*>#is", '', $html );
}
- wfProfileOut( __METHOD__ . '-flatten' );
return $html;
}
*/
public static function request( $method, $url, $options = array() ) {
wfDebug( "HTTP: $method: $url\n" );
- wfProfileIn( __METHOD__ . "-$method" );
$options['method'] = strtoupper( $method );
if ( $status->isOK() ) {
$content = $req->getContent();
}
- wfProfileOut( __METHOD__ . "-$method" );
return $content;
}
$target = self::normaliseSpecialPage( $target );
# If we don't know whether the page exists, let's find out.
- wfProfileIn( __METHOD__ . '-checkPageExistence' );
if ( !in_array( 'known', $options ) && !in_array( 'broken', $options ) ) {
if ( $target->isKnown() ) {
$options[] = 'known';
$options[] = 'broken';
}
}
- wfProfileOut( __METHOD__ . '-checkPageExistence' );
$oldquery = array();
if ( in_array( "forcearticlepath", $options ) && $query ) {
$defaults = array();
if ( !in_array( 'noclasses', $options ) ) {
- wfProfileIn( __METHOD__ . '-getClasses' );
# Now build the classes.
$classes = array();
if ( $classes != array() ) {
$defaults['class'] = implode( ' ', $classes );
}
- wfProfileOut( __METHOD__ . '-getClasses' );
}
# Get a default title attribute.
}
if ( $this->config->get( 'UseFileCache' ) && $title->getNamespace() >= 0 ) {
- wfProfileIn( 'main-try-filecache' );
if ( HTMLFileCache::useFileCache( $this->context ) ) {
// Try low-level file cache hit
$cache = new HTMLFileCache( $title, $action );
$this->context->getWikiPage()->doViewUpdates( $this->context->getUser() );
// Tell OutputPage that output is taken care of
$this->context->getOutput()->disable();
- wfProfileOut( 'main-try-filecache' );
return;
}
}
- wfProfileOut( 'main-try-filecache' );
}
// Actually do the work of the request and build up any output
if ( $res == self::NOT_MODIFIED ) {
$ok = true; // use client cache
} elseif ( $res == self::READY_STREAM ) {
- wfProfileIn( __METHOD__ . '-send' );
$ok = readfile( $fname );
- wfProfileOut( __METHOD__ . '-send' );
} else {
$ok = false; // failed
}
if ( get_class( $GLOBALS[$this->global] ) != $this->class ) {
$fname = __METHOD__ . '-' . $this->global;
- wfProfileIn( $fname );
$caller = wfGetCaller( $level );
if ( ++$recursionLevel > 2 ) {
- wfProfileOut( $fname );
throw new MWException( "Unstub loop detected on call of "
. "\${$this->global}->$name from $caller\n" );
}
. "\${$this->global}::$name from $caller\n" );
$GLOBALS[$this->global] = $this->_newObject();
--$recursionLevel;
- wfProfileOut( $fname );
return $GLOBALS[$this->global];
}
}
}
global $wgMemc;
- wfProfileIn( __METHOD__ . '-' . $action );
$limits = $wgRateLimits[$action];
$keys = array();
}
}
- wfProfileOut( __METHOD__ . '-' . $action );
return $triggered;
}
require "$IP/StartProfiler.php";
}
-wfProfileIn( 'WebStart.php-conf' );
# Load default settings
require_once "$IP/includes/DefaultSettings.php";
require_once MW_CONFIG_FILE;
}
-wfProfileOut( 'WebStart.php-conf' );
-wfProfileIn( 'WebStart.php-ob_start' );
# Initialise output buffering
# Check that there is no previous output or previously set up buffers, because
# that would cause us to potentially mix gzip and non-gzip output, creating a
require_once "$IP/includes/OutputHandler.php";
ob_start( 'wfOutputHandler' );
}
-wfProfileOut( 'WebStart.php-ob_start' );
if ( !defined( 'MW_NO_SETUP' ) ) {
require_once "$IP/includes/Setup.php";
$attribs = array_map( array( 'UtfNormal', 'cleanUp' ), $attribs );
}
if ( $contents ) {
- wfProfileIn( __METHOD__ . '-norm' );
$contents = $wgContLang->normalize( $contents );
- wfProfileOut( __METHOD__ . '-norm' );
}
return self::element( $element, $attribs, $contents );
}
*/
public function getItem( $code, $key ) {
if ( !isset( $this->loadedItems[$code][$key] ) ) {
- wfProfileIn( __METHOD__ . '-load' );
$this->loadItem( $code, $key );
- wfProfileOut( __METHOD__ . '-load' );
}
if ( $key === 'fallback' && isset( $this->shallowFallbacks[$code] ) ) {
if ( !isset( $this->loadedSubitems[$code][$key][$subkey] ) &&
!isset( $this->loadedItems[$code][$key] )
) {
- wfProfileIn( __METHOD__ . '-load' );
$this->loadSubitem( $code, $key, $subkey );
- wfProfileOut( __METHOD__ . '-load' );
}
if ( isset( $this->data[$code][$key][$subkey] ) ) {
$codeSequence = array_merge( array( $code ), $coreData['fallbackSequence'] );
$messageDirs = $this->getMessagesDirs();
- wfProfileIn( __METHOD__ . '-fallbacks' );
# Load non-JSON localisation data for extensions
$extensionData = array_combine(
}
}
- wfProfileOut( __METHOD__ . '-fallbacks' );
# Add cache dependencies for any referenced globals
$deps['wgExtensionMessagesFiles'] = new GlobalDependency( 'wgExtensionMessagesFiles' );
}
# Save to the persistent cache
- wfProfileIn( __METHOD__ . '-write' );
$this->store->startWrite( $code );
foreach ( $allData as $key => $value ) {
if ( in_array( $key, self::$splitKeys ) ) {
}
}
$this->store->finishWrite();
- wfProfileOut( __METHOD__ . '-write' );
# Clear out the MessageBlobStore
# HACK: If using a null (i.e. disabled) storage backend, we
# Hash of the contents is stored in memcache, to detect if local cache goes
# out of date (e.g. due to replace() on some other server)
if ( $wgUseLocalMessageCache ) {
- wfProfileIn( __METHOD__ . '-fromlocal' );
$hash = $this->mMemc->get( wfMemcKey( 'messages', $code, 'hash' ) );
if ( $hash ) {
$this->mCache[$code] = $cache;
}
}
- wfProfileOut( __METHOD__ . '-fromlocal' );
}
if ( !$success ) {
# the lock can't be acquired, wait for the other thread to finish
# and then try the global cache a second time.
for ( $failedAttempts = 0; $failedAttempts < 2; $failedAttempts++ ) {
- wfProfileIn( __METHOD__ . '-fromcache' );
$cache = $this->mMemc->get( $cacheKey );
if ( !$cache ) {
$where[] = 'global cache is empty';
$success = true;
}
- wfProfileOut( __METHOD__ . '-fromcache' );
if ( $success ) {
# Done, no need to retry
*/
public function getSkin() {
if ( $this->skin === null ) {
- wfProfileIn( __METHOD__ . '-createskin' );
$skin = null;
Hooks::run( 'RequestContextCreateSkin', array( $this, &$skin ) );
// After all that set a context on whatever skin got created
$this->skin->setContext( $this );
- wfProfileOut( __METHOD__ . '-createskin' );
}
return $this->skin;
$this->mPassword = $password;
$this->mDBname = $dbName;
- wfProfileIn( "dbconnect-$server" );
# The kernel's default SYN retransmission period is far too slow for us,
# so we use a short timeout plus a manual retry. Retrying means that a small
try {
$this->mConn = $this->mysqlConnect( $realServer );
} catch ( Exception $ex ) {
- wfProfileOut( "dbconnect-$server" );
$this->restoreErrorHandler();
throw $ex;
}
$error = $this->restoreErrorHandler();
- wfProfileOut( "dbconnect-$server" );
# Always log connection errors
if ( !$this->mConn ) {
$text = $wgContLang->normalizeForSearch( $text );
$lc = SearchEngine::legalSearchChars() . '&#;';
- wfProfileIn( __METHOD__ . '-regexps' );
$text = preg_replace( "/<\\/?\\s*[A-Za-z][^>]*?>/",
' ', $wgContLang->lc( " " . $text . " " ) ); # Strip HTML markup
$text = preg_replace( "/(^|\\n)==\\s*([^\\n]+)\\s*==(\\s)/sD",
# Strip wiki '' and '''
$text = preg_replace( "/''[']*/", " ", $text );
- wfProfileOut( __METHOD__ . '-regexps' );
return $text;
}
if ( $wgExternalDiffEngine == 'wikidiff2' && function_exists( 'wikidiff2_do_diff' ) ) {
# Better external diff engine, the 2 may some day be dropped
# This one does the escaping and segmenting itself
- wfProfileIn( 'wikidiff2_do_diff' );
$text = wikidiff2_do_diff( $otext, $ntext, 2 );
$text .= $this->debug( 'wikidiff2' );
- wfProfileOut( 'wikidiff2_do_diff' );
return $text;
}
fclose( $tempFile1 );
fclose( $tempFile2 );
$cmd = wfEscapeShellArg( $wgExternalDiffEngine, $tempName1, $tempName2 );
- wfProfileIn( __METHOD__ . "-shellexec" );
$difftext = wfShellExec( $cmd );
$difftext .= $this->debug( "external $wgExternalDiffEngine" );
- wfProfileOut( __METHOD__ . "-shellexec" );
unlink( $tempName1 );
unlink( $tempName2 );
}
}
}
- wfProfileIn( __METHOD__ . '-miss-' . $this->name );
$stat = $this->doGetFileStat( $params );
- wfProfileOut( __METHOD__ . '-miss-' . $this->name );
if ( is_array( $stat ) ) { // file exists
// Strongly consistent backends can automatically set "latest"
$stat['latest'] = isset( $stat['latest'] ) ? $stat['latest'] : $latest;
return $stat['map'];
}
}
- wfProfileIn( __METHOD__ . '-miss' );
- wfProfileIn( __METHOD__ . '-miss-' . $this->name );
$fields = $this->doGetFileXAttributes( $params );
$fields = is_array( $fields ) ? self::normalizeXAttributes( $fields ) : false;
- wfProfileOut( __METHOD__ . '-miss-' . $this->name );
- wfProfileOut( __METHOD__ . '-miss' );
$this->cheapCache->set( $path, 'xattr', array( 'map' => $fields, 'latest' => $latest ) );
return $fields;
return $stat['hash'];
}
}
- wfProfileIn( __METHOD__ . '-miss-' . $this->name );
$hash = $this->doGetFileSha1Base36( $params );
- wfProfileOut( __METHOD__ . '-miss-' . $this->name );
$this->cheapCache->set( $path, 'sha1', array( 'hash' => $hash, 'latest' => $latest ) );
return $hash;
if ( $res == StreamFile::NOT_MODIFIED ) {
// do nothing; client cache is up to date
} elseif ( $res == StreamFile::READY_STREAM ) {
- wfProfileIn( __METHOD__ . '-send-' . $this->name );
$status = $this->doStreamFile( $params );
- wfProfileOut( __METHOD__ . '-send-' . $this->name );
if ( !$status->isOK() ) {
// Per bug 41113, nasty things can happen if bad cache entries get
// stuck in cache. It's also possible that this error can come up
return null;
}
- wfProfileIn( __METHOD__ . "-{$this->name}-miss" );
list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->http->run( array(
'method' => 'HEAD',
'url' => $this->storageUrl( $auth, $container ),
'headers' => $this->authTokenHeaders( $auth )
) );
- wfProfileOut( __METHOD__ . "-{$this->name}-miss" );
if ( $rcode === 204 ) {
$stat = array(
}
// Actually render the thumbnail...
- wfProfileIn( __METHOD__ . '-doTransform' );
$thumb = $handler->doTransform( $this, $tmpThumbPath, $thumbUrl, $transformParams );
- wfProfileOut( __METHOD__ . '-doTransform' );
$tmpFile->bind( $thumb ); // keep alive with $thumb
if ( !$thumb ) { // bad params?
}
if ( !$props ) {
- wfProfileIn( __METHOD__ . '-getProps' );
if ( $this->repo->isVirtualUrl( $srcPath )
|| FileBackend::isStoragePath( $srcPath )
) {
} else {
$props = FSFile::getPropsFromPath( $srcPath );
}
- wfProfileOut( __METHOD__ . '-getProps' );
}
$options = array();
$dbw->begin( __METHOD__ );
if ( !$props ) {
- wfProfileIn( __METHOD__ . '-getProps' );
$props = $this->repo->getFileProps( $this->getVirtualUrl() );
- wfProfileOut( __METHOD__ . '-getProps' );
}
# Imports or such might force a certain timestamp; otherwise we generate
// Page exists, do RC entry now (otherwise we wait for later).
$logEntry->publish( $logId );
}
- wfProfileIn( __METHOD__ . '-edit' );
if ( $exists ) {
# Create a null revision
$dbw->commit( __METHOD__ ); // commit before anything bad can happen
}
- wfProfileOut( __METHOD__ . '-edit' );
if ( $reupload ) {
# Delete old thumbnails
- wfProfileIn( __METHOD__ . '-purge' );
$this->purgeThumbnails();
- wfProfileOut( __METHOD__ . '-purge' );
# Remove the old file from the squid cache
SquidUpdate::purge( array( $this->getURL() ) );
}
# Hooks, hooks, the magic of hooks...
- wfProfileIn( __METHOD__ . '-hooks' );
Hooks::run( 'FileUpload', array( $this, $reupload, $descTitle->exists() ) );
- wfProfileOut( __METHOD__ . '-hooks' );
# Invalidate cache for all pages using this file
$update = new HTMLCacheUpdate( $this->getTitle(), 'imagelinks' );
$this->runJobsLog( $job->toString() . " STARTING" );
// Run the job...
- wfProfileIn( __METHOD__ . '-' . get_class( $job ) );
$jobStartTime = microtime( true );
try {
++$jobsRun;
MWExceptionHandler::logException( $e );
}
$timeMs = intval( ( microtime( true ) - $jobStartTime ) * 1000 );
- wfProfileOut( __METHOD__ . '-' . get_class( $job ) );
$timeMsTotal += $timeMs;
// Mark the job as done on success or when the job cannot be retried
array( $this->escapeMagickOutput( $params['dstPath'] ) ) ) );
wfDebug( __METHOD__ . ": running ImageMagick: $cmd\n" );
- wfProfileIn( 'convert' );
$retval = 0;
$err = wfShellExecWithStderr( $cmd, $retval, $env );
- wfProfileOut( 'convert' );
if ( $retval !== 0 ) {
$this->logErrorForExternalProcess( $retval, $err, $cmd );
$cmd = str_replace( '%h', wfEscapeShellArg( $params['physicalHeight'] ),
str_replace( '%w', wfEscapeShellArg( $params['physicalWidth'] ), $cmd ) ); # Size
wfDebug( __METHOD__ . ": Running custom convert command $cmd\n" );
- wfProfileIn( 'convert' );
$retval = 0;
$err = wfShellExecWithStderr( $cmd, $retval );
- wfProfileOut( 'convert' );
if ( $retval !== 0 ) {
$this->logErrorForExternalProcess( $retval, $err, $cmd );
" -rotate " . wfEscapeShellArg( "-$rotation" ) . " " .
wfEscapeShellArg( $this->escapeMagickOutput( $params['dstPath'] ) );
wfDebug( __METHOD__ . ": running ImageMagick: $cmd\n" );
- wfProfileIn( 'convert' );
$retval = 0;
$err = wfShellExecWithStderr( $cmd, $retval );
- wfProfileOut( 'convert' );
if ( $retval !== 0 ) {
$this->logErrorForExternalProcess( $retval, $err, $cmd );
$cmd .= " | {$wgDjvuPostProcessor}";
}
$cmd .= ' > ' . wfEscapeShellArg( $dstPath ) . ') 2>&1';
- wfProfileIn( 'ddjvu' );
wfDebug( __METHOD__ . ": $cmd\n" );
$retval = '';
$err = wfShellExec( $cmd, $retval );
- wfProfileOut( 'ddjvu' );
$removed = $this->removeBadFile( $dstPath, $retval );
if ( $retval != 0 || $removed ) {
if ( isset( $wgDjvuDump ) ) {
# djvudump is faster as of version 3.5
# http://sourceforge.net/tracker/index.php?func=detail&aid=1704049&group_id=32953&atid=406583
- wfProfileIn( 'djvudump' );
$cmd = wfEscapeShellArg( $wgDjvuDump ) . ' ' . wfEscapeShellArg( $this->mFilename );
$dump = wfShellExec( $cmd );
$xml = $this->convertDumpToXML( $dump );
- wfProfileOut( 'djvudump' );
} elseif ( isset( $wgDjvuToXML ) ) {
- wfProfileIn( 'djvutoxml' );
$cmd = wfEscapeShellArg( $wgDjvuToXML ) . ' --without-anno --without-text ' .
wfEscapeShellArg( $this->mFilename );
$xml = wfShellExec( $cmd );
- wfProfileOut( 'djvutoxml' );
} else {
$xml = null;
}
# Text layer
if ( isset( $wgDjvuTxt ) ) {
- wfProfileIn( 'djvutxt' );
$cmd = wfEscapeShellArg( $wgDjvuTxt ) . ' --detail=page ' . wfEscapeShellArg( $this->mFilename );
wfDebug( __METHOD__ . ": $cmd\n" );
$retval = '';
$txt = wfShellExec( $cmd, $retval, array(), array( 'memory' => self::DJVUTXT_MEMORY_LIMIT ) );
- wfProfileOut( 'djvutxt' );
if ( $retval == 0 ) {
# Strip some control characters
$txt = preg_replace( "/[\013\035\037]/", "", $txt );
" -outfile " . wfEscapeShellArg( $params['dstPath'] ) .
" " . wfEscapeShellArg( $params['srcPath'] );
wfDebug( __METHOD__ . ": running jpgtran: $cmd\n" );
- wfProfileIn( 'jpegtran' );
$retval = 0;
$err = wfShellExecWithStderr( $cmd, $retval );
- wfProfileOut( 'jpegtran' );
if ( $retval !== 0 ) {
$this->logErrorForExternalProcess( $retval, $err, $cmd );
$env['LANG'] = $lang;
}
- wfProfileIn( 'rsvg' );
wfDebug( __METHOD__ . ": $cmd\n" );
$err = wfShellExecWithStderr( $cmd, $retval, $env );
- wfProfileOut( 'rsvg' );
}
}
$removed = $this->removeBadFile( $dstPath, $retval );
$linkCache = LinkCache::singleton();
$output = $this->parent->getOutput();
- wfProfileIn( __METHOD__ . '-check' );
$dbr = wfGetDB( DB_SLAVE );
$threshold = $this->parent->getOptions()->getStubThreshold();
//pass an array of page_ids to an extension
Hooks::run( 'GetLinkColours', array( $linkcolour_ids, &$colours ) );
}
- wfProfileOut( __METHOD__ . '-check' );
# Do a second query for different language variants of links and categories
if ( $wgContLang->hasVariants() ) {
}
# Construct search and replace arrays
- wfProfileIn( __METHOD__ . '-construct' );
$replacePairs = array();
foreach ( $this->internals as $ns => $entries ) {
foreach ( $entries as $index => $entry ) {
}
}
$replacer = new HashtableReplacer( $replacePairs, 1 );
- wfProfileOut( __METHOD__ . '-construct' );
# Do the thing
- wfProfileIn( __METHOD__ . '-replace' );
$text = preg_replace_callback(
'/(<!--LINK .*?-->)/',
$replacer->cb(),
$text
);
- wfProfileOut( __METHOD__ . '-replace' );
}
/**
global $wgShowHostnames;
$fname = __METHOD__ . '-' . wfGetCaller();
- wfProfileIn( $fname );
if ( $clearState ) {
$magicScopeVariable = $this->lock();
$this->mRevisionSize = $oldRevisionSize;
$this->mInputSize = false;
$this->currentRevisionCache = null;
- wfProfileOut( $fname );
return $this->mOutput;
}
public function replaceInternalLinks2( &$s ) {
global $wgExtraInterlanguageLinkPrefixes;
- wfProfileIn( __METHOD__ . '-setup' );
static $tc = false, $e1, $e1_img;
# the % is needed to support urlencoded titles as well
if ( !$tc ) {
}
if ( is_null( $this->mTitle ) ) {
- wfProfileOut( __METHOD__ . '-setup' );
throw new MWException( __METHOD__ . ": \$this->mTitle is null\n" );
}
$nottalk = !$this->mTitle->isTalkPage();
}
$useSubpages = $this->areSubpagesAllowed();
- wfProfileOut( __METHOD__ . '-setup' );
// @codingStandardsIgnoreStart Squiz.WhiteSpace.SemicolonSpacing.Incorrect
# Loop for each link
}
if ( $useLinkPrefixExtension ) {
- wfProfileIn( __METHOD__ . '-prefixhandling' );
if ( preg_match( $e2, $s, $m ) ) {
$prefix = $m[2];
$s = $m[1];
$prefix = $first_prefix;
$first_prefix = false;
}
- wfProfileOut( __METHOD__ . '-prefixhandling' );
}
$might_be_img = false;
- wfProfileIn( __METHOD__ . "-e1" );
if ( preg_match( $e1, $line, $m ) ) { # page with normal text or alt
$text = $m[2];
# If we get a ] at the beginning of $m[3] that means we have a link that's something like:
$trail = "";
} else { # Invalid form; output directly
$s .= $prefix . '[[' . $line;
- wfProfileOut( __METHOD__ . "-e1" );
continue;
}
- wfProfileOut( __METHOD__ . "-e1" );
- wfProfileIn( __METHOD__ . "-misc" );
$origLink = $m[1];
# should be external links.
if ( preg_match( '/^(?i:' . $this->mUrlProtocols . ')/', $origLink ) ) {
$s .= $prefix . '[[' . $line;
- wfProfileOut( __METHOD__ . "-misc" );
continue;
}
$link = substr( $link, 1 );
}
- wfProfileOut( __METHOD__ . "-misc" );
- wfProfileIn( __METHOD__ . "-title" );
$nt = Title::newFromText( $this->mStripState->unstripNoWiki( $link ) );
if ( $nt === null ) {
$s .= $prefix . '[[' . $line;
- wfProfileOut( __METHOD__ . "-title" );
continue;
}
$ns = $nt->getNamespace();
$iw = $nt->getInterwiki();
- wfProfileOut( __METHOD__ . "-title" );
if ( $might_be_img ) { # if this is actually an invalid link
- wfProfileIn( __METHOD__ . "-might_be_img" );
if ( $ns == NS_FILE && $noforce ) { # but might be an image
$found = false;
while ( true ) {
$holders->merge( $this->replaceInternalLinks2( $text ) );
$s .= "{$prefix}[[$link|$text";
# note: no $trail, because without an end, there *is* no trail
- wfProfileOut( __METHOD__ . "-might_be_img" );
continue;
}
} else { # it's not an image, so output it raw
$s .= "{$prefix}[[$link|$text";
# note: no $trail, because without an end, there *is* no trail
- wfProfileOut( __METHOD__ . "-might_be_img" );
continue;
}
- wfProfileOut( __METHOD__ . "-might_be_img" );
}
$wasblank = ( $text == '' );
# Link not escaped by : , create the various objects
if ( $noforce && !$nt->wasLocalInterwiki() ) {
# Interwikis
- wfProfileIn( __METHOD__ . "-interwiki" );
if (
$iw && $this->mOptions->getInterwikiMagic() && $nottalk && (
Language::fetchLanguageName( $iw, null, 'mw' ) ||
$s = rtrim( $s . $prefix );
$s .= trim( $trail, "\n" ) == '' ? '': $prefix . $trail;
- wfProfileOut( __METHOD__ . "-interwiki" );
continue;
}
- wfProfileOut( __METHOD__ . "-interwiki" );
if ( $ns == NS_FILE ) {
- wfProfileIn( __METHOD__ . "-image" );
if ( !wfIsBadImage( $nt->getDBkey(), $this->mTitle ) ) {
if ( $wasblank ) {
# if no parameters were passed, $text
} else {
$s .= $prefix . $trail;
}
- wfProfileOut( __METHOD__ . "-image" );
continue;
}
if ( $ns == NS_CATEGORY ) {
- wfProfileIn( __METHOD__ . "-category" );
$s = rtrim( $s . "\n" ); # bug 87
if ( $wasblank ) {
*/
$s .= trim( $prefix . $trail, "\n" ) == '' ? '' : $prefix . $trail;
- wfProfileOut( __METHOD__ . "-category" );
continue;
}
}
# NS_MEDIA is a pseudo-namespace for linking directly to a file
# @todo FIXME: Should do batch file existence checks, see comment below
if ( $ns == NS_MEDIA ) {
- wfProfileIn( __METHOD__ . "-media" );
# Give extensions a chance to select the file revision for us
$options = array();
$descQuery = false;
# Cloak with NOPARSE to avoid replacement in replaceExternalLinks
$s .= $prefix . $this->armorLinks(
Linker::makeMediaLinkFile( $nt, $file, $text ) ) . $trail;
- wfProfileOut( __METHOD__ . "-media" );
continue;
}
- wfProfileIn( __METHOD__ . "-always_known" );
# Some titles, such as valid special pages or files in foreign repos, should
# be shown as bluelinks even though they're not included in the page table
#
# Links will be added to the output link list after checking
$s .= $holders->makeHolder( $nt, $text, array(), $trail, $prefix );
}
- wfProfileOut( __METHOD__ . "-always_known" );
}
return $holders;
}
# If we have no prefixes, go to paragraph mode.
if ( 0 == $prefixLength ) {
- wfProfileIn( __METHOD__ . "-paragraph" );
# No prefix (not in list)--go to paragraph mode
# XXX: use a stack for nestable elements like span, table and div
$openmatch = preg_match(
}
}
}
- wfProfileOut( __METHOD__ . "-paragraph" );
}
# somewhere above we forget to get out of pre block (bug 785)
if ( $preCloseMatch && $this->mInPre ) {
* @return string The text of the template
*/
public function braceSubstitution( $piece, $frame ) {
- wfProfileIn( __METHOD__ . '-setup' );
// Flags
# @todo FIXME: If piece['parts'] is null then the call to getLength()
# below won't work b/c this $args isn't an object
$args = ( null == $piece['parts'] ) ? array() : $piece['parts'];
- wfProfileOut( __METHOD__ . '-setup' );
$profileSection = null; // profile templates
# SUBST
- wfProfileIn( __METHOD__ . '-modifiers' );
if ( !$found ) {
$substMatch = $this->mSubstWords->matchStartAndRemove( $part1 );
$forceRawInterwiki = true;
}
}
- wfProfileOut( __METHOD__ . '-modifiers' );
# Parser functions
if ( !$found ) {
- wfProfileIn( __METHOD__ . '-pfunc' );
$colonPos = strpos( $part1, ':' );
if ( $colonPos !== false ) {
try {
$result = $this->callParserFunction( $frame, $func, $funcArgs );
} catch ( Exception $ex ) {
- wfProfileOut( __METHOD__ . '-pfunc' );
throw $ex;
}
# here.
extract( $result );
}
- wfProfileOut( __METHOD__ . '-pfunc' );
}
# Finish mangling title and then check for loops.
# Load from database
if ( !$found && $title ) {
$profileSection = $this->mProfiler->scopedProfileIn( $title->getPrefixedDBkey() );
- wfProfileIn( __METHOD__ . '-loadtpl' );
if ( !$title->isExternal() ) {
if ( $title->isSpecialPage()
&& $this->mOptions->getAllowSpecialInclusion()
. '</span>';
wfDebug( __METHOD__ . ": template loop broken at '$titleText'\n" );
}
- wfProfileOut( __METHOD__ . '-loadtpl' );
}
# If we haven't found text to substitute by now, we're done
}
}
- wfProfileIn( __METHOD__ . '-pfunc-' . $function );
list( $callback, $flags ) = $this->mFunctionHooks[$function];
# Workaround for PHP bug 35229 and similar
if ( !is_callable( $callback ) ) {
- wfProfileOut( __METHOD__ . '-pfunc-' . $function );
throw new MWException( "Tag hook for $function is not callable\n" );
}
$result['text'] = $this->preprocessToDom( $result['text'], $preprocessFlags );
$result['isChildObj'] = true;
}
- wfProfileOut( __METHOD__ . '-pfunc-' . $function );
return $result;
}
$file = $this->fetchFileNoRegister( $title, $options );
$handler = $file ? $file->getHandler() : false;
- wfProfileIn( __METHOD__ . '-getMagicWord' );
$paramMap = array(
'img_alt' => 'gallery-internal-alt',
'img_link' => 'gallery-internal-link',
}
$mwArray = new MagicWordArray( array_keys( $paramMap ) );
- wfProfileOut( __METHOD__ . '-getMagicWord' );
$label = '';
$alt = '';
$xml .= "</list>";
- wfProfileIn( __METHOD__ . '-loadXML' );
$dom = new DOMDocument();
wfSuppressWarnings();
$result = $dom->loadXML( $xml );
// don't barf when the XML is >256 levels deep
$result = $dom->loadXML( $xml, 1 << 19 );
}
- wfProfileOut( __METHOD__ . '-loadXML' );
if ( !$result ) {
throw new MWException( 'Parameters passed to ' . __METHOD__ . ' result in invalid XML' );
$cacheable = ( $wgPreprocessorCacheThreshold !== false
&& strlen( $text ) > $wgPreprocessorCacheThreshold );
if ( $cacheable ) {
- wfProfileIn( __METHOD__ . '-cacheable' );
$cacheKey = wfMemcKey( 'preprocess-xml', md5( $text ), $flags );
$cacheValue = $wgMemc->get( $cacheKey );
}
}
if ( $xml === false ) {
- wfProfileIn( __METHOD__ . '-cache-miss' );
$xml = $this->preprocessToXml( $text, $flags );
$cacheValue = sprintf( "%08d", self::CACHE_VERSION ) . $xml;
$wgMemc->set( $cacheKey, $cacheValue, 86400 );
- wfProfileOut( __METHOD__ . '-cache-miss' );
wfDebugLog( "Preprocessor", "Saved preprocessor XML to memcached (key $cacheKey)" );
}
} else {
$max = $this->parser->mOptions->getMaxGeneratedPPNodeCount();
if ( $this->parser->mGeneratedPPNodeCount > $max ) {
if ( $cacheable ) {
- wfProfileOut( __METHOD__ . '-cacheable' );
}
throw new MWException( __METHOD__ . ': generated node count limit exceeded' );
}
- wfProfileIn( __METHOD__ . '-loadXML' );
$dom = new DOMDocument;
wfSuppressWarnings();
$result = $dom->loadXML( $xml );
if ( $result ) {
$obj = new PPNode_DOM( $dom->documentElement );
}
- wfProfileOut( __METHOD__ . '-loadXML' );
if ( $cacheable ) {
- wfProfileOut( __METHOD__ . '-cacheable' );
}
&& strlen( $text ) > $wgPreprocessorCacheThreshold;
if ( $cacheable ) {
- wfProfileIn( __METHOD__ . '-cacheable' );
$cacheKey = wfMemcKey( 'preprocess-hash', md5( $text ), $flags );
$cacheValue = $wgMemc->get( $cacheKey );
// From the cache
wfDebugLog( "Preprocessor",
"Loaded preprocessor hash from memcached (key $cacheKey)" );
- wfProfileOut( __METHOD__ . '-cacheable' );
return $hash;
}
}
- wfProfileIn( __METHOD__ . '-cache-miss' );
}
$rules = array(
}
if ( !$node ) {
if ( $cacheable ) {
- wfProfileOut( __METHOD__ . '-cache-miss' );
- wfProfileOut( __METHOD__ . '-cacheable' );
}
throw new MWException( __METHOD__ . ': eqpos not found' );
}
if ( $node->name !== 'equals' ) {
if ( $cacheable ) {
- wfProfileOut( __METHOD__ . '-cache-miss' );
- wfProfileOut( __METHOD__ . '-cacheable' );
}
throw new MWException( __METHOD__ . ': eqpos is not equals' );
}
if ( $cacheable ) {
$cacheValue = sprintf( "%08d", self::CACHE_VERSION ) . serialize( $rootNode );
$wgMemc->set( $cacheKey, $cacheValue, 86400 );
- wfProfileOut( __METHOD__ . '-cache-miss' );
- wfProfileOut( __METHOD__ . '-cacheable' );
wfDebugLog( "Preprocessor", "Saved preprocessor Hash to memcached (key $cacheKey)" );
}
$this->errors[] = self::formatExceptionNoComment( $e );
}
- wfProfileIn( __METHOD__ . '-getModifiedTime' );
// To send Last-Modified and support If-Modified-Since, we need to detect
// the last modified time
}
}
- wfProfileOut( __METHOD__ . '-getModifiedTime' );
// If there's an If-Modified-Since header, respond with a 304 appropriately
if ( $this->tryRespondLastModified( $context, $mtime ) ) {
* @var $module ResourceLoaderModule
*/
- wfProfileIn( __METHOD__ . '-' . $name );
try {
$scripts = '';
if ( $context->shouldIncludeScripts() ) {
unset( $modules[$name] );
}
$isRaw |= $module->isRaw();
- wfProfileOut( __METHOD__ . '-' . $name );
}
// Update module states
return $this->modifiedTime[$context->getHash()];
}
- wfProfileIn( __METHOD__ . '-filemtime' );
$filesMtime = max( array_map( array( __CLASS__, 'safeFilemtime' ), $files ) );
- wfProfileOut( __METHOD__ . '-filemtime' );
$this->modifiedTime[$context->getHash()] = max(
$filesMtime,
$spat .= '/';
$textExt = array(); // text extracts
$otherExt = array(); // other extracts
- wfProfileIn( "$fname-split" );
$start = 0;
$textLen = strlen( $text );
$count = 0; // sequence number to maintain ordering
$all = $textExt + $otherExt; // these have disjunct key sets
- wfProfileOut( "$fname-split" );
// prepare regexps
foreach ( $terms as $index => $term ) {
$pat1 = "/(" . $phrase . ")/ui";
$pat2 = "/$patPre(" . $anyterm . ")$patPost/ui";
- wfProfileIn( "$fname-extract" );
$left = $contextlines;
}
}
- wfProfileOut( "$fname-extract" );
return $extract;
}
*/
function removeWiki( $text ) {
$fname = __METHOD__;
- wfProfileIn( $fname );
// $text = preg_replace( "/'{2,5}/", "", $text );
// $text = preg_replace( "/\[[a-z]+:\/\/[^ ]+ ([^]]+)\]/", "\\2", $text );
$text = preg_replace( "/('''|<\/?[iIuUbB]>)/", "", $text );
$text = preg_replace( "/''/", "", $text );
- wfProfileOut( $fname );
return $text;
}
$lineno = 0;
$extract = "";
- wfProfileIn( "$fname-extract" );
foreach ( $lines as $line ) {
if ( 0 == $contextlines ) {
break;
$extract .= "${line}\n";
}
- wfProfileOut( "$fname-extract" );
return $extract;
}
$user = $this->getUser();
$title = $this->getTitle();
- wfProfileIn( __METHOD__ . '-init' );
$tpl = $this->setupTemplate( $this->template, 'skins' );
- wfProfileOut( __METHOD__ . '-init' );
- wfProfileIn( __METHOD__ . '-stuff' );
$this->thispage = $title->getPrefixedDBkey();
$this->titletxt = $title->getPrefixedText();
$this->userpage = $user->getUserPage()->getPrefixedText();
$this->userpageUrlDetails = self::makeKnownUrlDetails( $this->userpage );
}
- wfProfileOut( __METHOD__ . '-stuff' );
return $tpl;
$out = $this->getOutput();
- wfProfileIn( __METHOD__ . '-init' );
$this->initPage( $out );
- wfProfileOut( __METHOD__ . '-init' );
$tpl = $this->prepareQuickTemplate( $out );
// execute template
- wfProfileIn( __METHOD__ . '-execute' );
$res = $tpl->execute();
- wfProfileOut( __METHOD__ . '-execute' );
// result may be an error
$this->printOrError( $res );
$out = $this->getOutput();
$tpl = $this->setupTemplateForOutput();
- wfProfileIn( __METHOD__ . '-stuff2' );
$tpl->set( 'title', $out->getPageTitle() );
$tpl->set( 'pagetitle', $out->getHTMLTitle() );
$tpl->set( 'displaytitle', $out->mPageLinkTitle );
$tpl->set( 'userlangattributes', $attrs );
}
- wfProfileOut( __METHOD__ . '-stuff2' );
- wfProfileIn( __METHOD__ . '-stuff3' );
$tpl->set( 'newtalk', $this->getNewtalks() );
$tpl->set( 'logo', $this->logoText() );
}
$tpl->set( 'copyright', $this->getCopyright() );
}
- wfProfileOut( __METHOD__ . '-stuff3' );
- wfProfileIn( __METHOD__ . '-stuff4' );
$tpl->set( 'copyrightico', $this->getCopyrightIcon() );
$tpl->set( 'poweredbyico', $this->getPoweredBy() );
$tpl->set( 'disclaimer', $this->disclaimerLink() );
} else {
$tpl->set( 'language_urls', false );
}
- wfProfileOut( __METHOD__ . '-stuff4' );
- wfProfileIn( __METHOD__ . '-stuff5' );
# Personal toolbar
$tpl->set( 'personal_urls', $this->buildPersonalUrls() );
$content_navigation = $this->buildContentNavigationUrls();
// allow extensions adding stuff after the page content.
// See Skin::afterContentHook() for further documentation.
$tpl->set( 'dataAfterContent', $this->afterContentHook() );
- wfProfileOut( __METHOD__ . '-stuff5' );
return $tpl;
}
);
}
- wfProfileIn( __METHOD__ . '-edit' );
// Checks if user can edit the current page if it exists or create it otherwise
if ( $title->quickUserCan( 'edit', $user )
'primary' => true, // don't collapse this in vector
);
}
- wfProfileOut( __METHOD__ . '-edit' );
- wfProfileIn( __METHOD__ . '-live' );
// Checks if the page exists
if ( $title->exists() ) {
// Adds history view link
);
}
- wfProfileOut( __METHOD__ . '-live' );
// Checks if the user is logged in
if ( $this->loggedin && $user->isAllowedAll( 'viewmywatchlist', 'editmywatchlist' ) ) {
*/
public static function getCustomisedStatuses( $messageNames, $langcode = 'en', $foreign = false ) {
// FIXME: This function should be moved to Language:: or something.
- wfProfileIn( __METHOD__ . '-db' );
$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select( 'page',
}
}
- wfProfileOut( __METHOD__ . '-db' );
return array( 'pages' => $pageFlags, 'talks' => $talkFlags );
}
// entropy so this is also preferable to just trying to read urandom because it may work
// on Windows systems as well.
if ( function_exists( 'mcrypt_create_iv' ) ) {
- wfProfileIn( __METHOD__ . '-mcrypt' );
$rem = $bytes - strlen( $buffer );
$iv = mcrypt_create_iv( $rem, MCRYPT_DEV_URANDOM );
if ( $iv === false ) {
wfDebug( __METHOD__ . ": mcrypt_create_iv generated " . strlen( $iv ) .
" bytes of randomness.\n" );
}
- wfProfileOut( __METHOD__ . '-mcrypt' );
}
}
if ( function_exists( 'openssl_random_pseudo_bytes' )
&& ( !wfIsWindows() || version_compare( PHP_VERSION, '5.3.4', '>=' ) )
) {
- wfProfileIn( __METHOD__ . '-openssl' );
$rem = $bytes - strlen( $buffer );
$openssl_bytes = openssl_random_pseudo_bytes( $rem, $openssl_strong );
if ( $openssl_bytes === false ) {
// using it use it's say on whether the randomness is strong
$this->strong = !!$openssl_strong;
}
- wfProfileOut( __METHOD__ . '-openssl' );
}
}
if ( strlen( $buffer ) < $bytes &&
( function_exists( 'stream_set_read_buffer' ) || $forceStrong )
) {
- wfProfileIn( __METHOD__ . '-fopen-urandom' );
$rem = $bytes - strlen( $buffer );
if ( !function_exists( 'stream_set_read_buffer' ) && $forceStrong ) {
wfDebug( __METHOD__ . ": Was forced to read from /dev/urandom " .
} else {
wfDebug( __METHOD__ . ": /dev/urandom could not be opened.\n" );
}
- wfProfileOut( __METHOD__ . '-fopen-urandom' );
}
// If we cannot use or generate enough data from a secure source
": Falling back to using a pseudo random state to generate randomness.\n" );
}
while ( strlen( $buffer ) < $bytes ) {
- wfProfileIn( __METHOD__ . '-fallback' );
$buffer .= $this->hmac( $this->randomState(), mt_rand() );
// This code is never really cryptographically strong, if we use it
// at all, then set strong to false.
$this->strong = false;
- wfProfileOut( __METHOD__ . '-fallback' );
}
// Once the buffer has been filled up with enough random data to fulfill
*/
function replace( $subject ) {
if ( function_exists( 'fss_prep_replace' ) ) {
- wfProfileIn( __METHOD__ . '-fss' );
if ( $this->fss === false ) {
$this->fss = fss_prep_replace( $this->data );
}
$result = fss_exec_replace( $this->fss, $subject );
- wfProfileOut( __METHOD__ . '-fss' );
} else {
- wfProfileIn( __METHOD__ . '-strtr' );
$result = strtr( $subject, $this->data );
- wfProfileOut( __METHOD__ . '-strtr' );
}
return $result;
require __DIR__ . '/includes/WebStart.php';
-wfProfileIn( 'load.php' );
// URL safety checks
if ( !$wgRequest->checkUrlExtension() ) {
$resourceLoader = new ResourceLoader( $configFactory->makeConfig( 'main' ) );
$resourceLoader->respond( new ResourceLoaderContext( $resourceLoader, $wgRequest ) );
-wfProfileOut( 'load.php' );
wfLogProfilingData();
// Shut down the database.