profiler: Centralise output responsibility from ProfilerOutputText to Profiler
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 28 Aug 2019 00:41:42 +0000 (01:41 +0100)
committerKrinkle <krinklemail@gmail.com>
Wed, 28 Aug 2019 16:07:18 +0000 (16:07 +0000)
commit8a87ec277858c4e72e8f654627c5363ec979771b
tree73199226c75c416297813c3f19b29bcea8358903
parentc3bb16690419f3c70ebba2839e0d18925c29effa
profiler: Centralise output responsibility from ProfilerOutputText to Profiler

Make it Profiler.php's responsibility to enforce this, based on the
existing signal from ProfilerOutput::logsToOutput().

The ProfilerOutputText class should not have to double-check this
a second time.

Long-term, I'd like even this check in Profiler::logDataPageOutputOnly
to be removed, because really the external caller of that should
know whether it is safe to output stuff or not rather than stashing
its own state inside Profiler::$allowOutput and then implicitly
reading it back out again later on. But, that's for another time.

Also:
* Remove use of deprecated Profiler::setTemplated while at it.
* Make 'visible' parameter explicit, as for other parameters.

Change-Id: Iaa3fc4ea25a059b90235d769db60c04b8f152f05
includes/profiler/Profiler.php
includes/profiler/output/ProfilerOutput.php
includes/profiler/output/ProfilerOutputText.php
includes/skins/SkinTemplate.php
load.php
maintenance/Maintenance.php