X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRevision%2FRevisionRenderer.php;h=265ad133a47d58d128193caa4332a1d77e766fa2;hb=8c5cb4b1a76cfef9cf4f62aac54ee537d59de560;hp=e2e84b60ca7780e58693763d62e56002aca3f3fe;hpb=07850059ee02d75cb69a22a9073779d399aaa7d8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Revision/RevisionRenderer.php b/includes/Revision/RevisionRenderer.php index e2e84b60ca..265ad133a4 100644 --- a/includes/Revision/RevisionRenderer.php +++ b/includes/Revision/RevisionRenderer.php @@ -82,6 +82,11 @@ class RevisionRenderer { * - 'audience' the audience to use for content access. Default is * RevisionRecord::FOR_PUBLIC if $forUser is not set, RevisionRecord::FOR_THIS_USER * if $forUser is set. Can be set to RevisionRecord::RAW to disable audience checks. + * - 'known-revision-output' a combined ParserOutput for the revision, perhaps from + * some cache. the caller is responsible for ensuring that the ParserOutput indeed + * matched the $rev and $options. This mechanism is intended as a temporary stop-gap, + * for the time until caches have been changed to store RenderedRevision states instead + * of ParserOutput objects. * * @return RenderedRevision|null The rendered revision, or null if the audience checks fails. */ @@ -133,6 +138,10 @@ class RevisionRenderer { $renderedRevision->setSaveParseLogger( $this->saveParseLogger ); + if ( isset( $hints['known-revision-output'] ) ) { + $renderedRevision->setRevisionParserOutput( $hints['known-revision-output'] ); + } + return $renderedRevision; }