dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move NewPP limit report HTML comments to JS variables
[lhc/web/wiklou.git]
/
includes
/
OutputPage.php
diff --git
a/includes/OutputPage.php
b/includes/OutputPage.php
index
f611980
..
c8a385a
100644
(file)
--- a/
includes/OutputPage.php
+++ b/
includes/OutputPage.php
@@
-290,6
+290,9
@@
class OutputPage extends ContextSource {
*/
private $copyrightUrl;
*/
private $copyrightUrl;
+ /** @var array Profiling data */
+ private $limitReportData = [];
+
/**
* Constructor for OutputPage. This should not be called directly.
* Instead a new RequestContext should be created and it will implicitly create
/**
* Constructor for OutputPage. This should not be called directly.
* Instead a new RequestContext should be created and it will implicitly create
@@
-1754,11
+1757,14
@@
class OutputPage extends ContextSource {
}
}
}
}
- //
e
nable OOUI if requested via ParserOutput
+ //
E
nable OOUI if requested via ParserOutput
if ( $parserOutput->getEnableOOUI() ) {
$this->enableOOUI();
}
if ( $parserOutput->getEnableOOUI() ) {
$this->enableOOUI();
}
+ // Include profiling data
+ $this->limitReportData = $parserOutput->getLimitReportData();
+
// Link flags are ignored for now, but may in the future be
// used to mark individual language links.
$linkFlags = [];
// Link flags are ignored for now, but may in the future be
// used to mark individual language links.
$linkFlags = [];
@@
-3075,7
+3081,8
@@
class OutputPage extends ContextSource {
* @return string
*/
function getBottomScripts() {
* @return string
*/
function getBottomScripts() {
- return $this->getScriptsForBottomQueue();
+ return $this->getScriptsForBottomQueue() .
+ Skin::makeVariablesScript( [ 'wgPageParseReport' => $this->limitReportData ] );
}
/**
}
/**