X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fdiff%2FDifferenceEngine.php;h=8f57c578eba40e8c5333ba47a0a74d765876be0b;hb=4187f85473958bd6560d48c8891511e2f9bcf1d4;hp=7e05be6675ed5d021223933d654469d15a5b657c;hpb=78418f5728259c024ac3b2016e1edd0ab794c9c0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 7e05be6675..8f57c578eb 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -542,7 +542,7 @@ class DifferenceEngine extends ContextSource { [ 'rc_timestamp' => $db->timestamp( $this->mNewRev->getTimestamp() ), 'rc_this_oldid' => $this->mNewid, - 'rc_patrolled' => 0 + 'rc_patrolled' => RecentChange::PRC_UNPATROLLED ], __METHOD__ ); @@ -650,13 +650,14 @@ class DifferenceEngine extends ContextSource { } } + /** + * @param WikiPage $page + * @param Revision $rev + * + * @return ParserOutput|bool False if the revision was not found + */ protected function getParserOutput( WikiPage $page, Revision $rev ) { $parserOptions = $page->makeParserOptions( $this->getContext() ); - - if ( !$rev->isCurrent() || !$rev->getTitle()->quickUserCan( 'edit', $this->getUser() ) ) { - $parserOptions->setEditSection( false ); - } - $parserOutput = $page->getParserOutput( $parserOptions, $rev->getId() ); return $parserOutput; @@ -1293,7 +1294,7 @@ class DifferenceEngine extends ContextSource { if ( !$diff && !$otitle ) { $header .= " - + {$ntitle} "; $multiColspan = 1; @@ -1312,7 +1313,7 @@ class DifferenceEngine extends ContextSource { } if ( $otitle || $ntitle ) { $header .= " - + {$otitle} {$ntitle} "; @@ -1320,12 +1321,12 @@ class DifferenceEngine extends ContextSource { } if ( $multi != '' ) { - $header .= "{$multi}"; } if ( $notice != '' ) { - $header .= "{$notice}"; + $header .= "{$notice}"; } return $header . $diff . "";