mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CiteThisPage
synced 2024-11-24 07:33:49 +00:00
Apply live hack from Wikimedia code base: more profiling points in Cite.php
This commit is contained in:
parent
f9c505ec12
commit
eebfc51c57
10
Cite.php
10
Cite.php
|
@ -318,6 +318,8 @@ function wfCite() {
|
|||
if ( count( $this->mRefs ) == 0 )
|
||||
return '';
|
||||
|
||||
wfProfileIn( __METHOD__ );
|
||||
wfProfileIn( __METHOD__ .'-entries' );
|
||||
$ent = array();
|
||||
foreach ( $this->mRefs as $k => $v )
|
||||
$ent[] = $this->referencesFormatEntry( $k, $v );
|
||||
|
@ -326,8 +328,14 @@ function wfCite() {
|
|||
$suffix = wfMsgForContentNoTrans( 'cite_references_suffix' );
|
||||
$content = implode( "\n", $ent );
|
||||
|
||||
wfProfileOut( __METHOD__ .'-entries' );
|
||||
wfProfileIn( __METHOD__ .'-parse' );
|
||||
// Live hack: parse() adds two newlines on WM, can't reproduce it locally -ævar
|
||||
return rtrim( $this->parse( $prefix . $content . $suffix ), "\n" );
|
||||
$ret = rtrim( $this->parse( $prefix . $content . $suffix ), "\n" );
|
||||
wfProfileOut( __METHOD__ .'-parse' );
|
||||
wfProfileOut( __METHOD__ );
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue