From: Jack Phoenix Date: Fri, 9 Dec 2016 06:59:52 +0000 (+0200) Subject: Make DifferenceEngine's markPatrolledLink and getRevisionHeader public so that hooked... X-Git-Tag: 1.31.0-rc.0~4587 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E//%22%24curUrl/%22?a=commitdiff_plain;h=c40fbea783da5f7a302da0ff05fcab81db79afe9;p=lhc%2Fweb%2Fwiklou.git 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 --- 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();