From c40fbea783da5f7a302da0ff05fcab81db79afe9 Mon Sep 17 00:00:00 2001 From: Jack Phoenix Date: Fri, 9 Dec 2016 08:59:52 +0200 Subject: [PATCH] Make DifferenceEngine's markPatrolledLink and getRevisionHeader public so that hooked functions can use them where needed The said hooks were added to core in https://gerrit.wikimedia.org/r/#/c/298026/ . One of the many intended use cases is https://gerrit.wikimedia.org/r/#/c/326074/ which currently fatals due to these two being protected, and obviously we don't want to lose functionality when hooking into one (or more) of the aforementioned hooks. Change-Id: I260c8b57c0bb2af3a6982bd7142b112a4a023391 Depends-On: I02de9069854532faec4c0c1798a10f862e6dfd7c --- includes/diff/DifferenceEngine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 5e40f43b5f..c27c89c8cf 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -482,7 +482,7 @@ class DifferenceEngine extends ContextSource { * * @return string HTML or empty string */ - protected function markPatrolledLink() { + public function markPatrolledLink() { if ( $this->mMarkPatrolledLink === null ) { $linkInfo = $this->getMarkPatrolledLinkInfo(); // If false, there is no patrol link needed/allowed @@ -1065,7 +1065,7 @@ class DifferenceEngine extends ContextSource { * * @return string HTML fragment */ - protected function getRevisionHeader( Revision $rev, $complete = '' ) { + public function getRevisionHeader( Revision $rev, $complete = '' ) { $lang = $this->getLanguage(); $user = $this->getUser(); $revtimestamp = $rev->getTimestamp(); -- 2.20.1