Make DifferenceEngine's markPatrolledLink and getRevisionHeader public so that hooked...
authorJack Phoenix <jack@countervandalism.net>
Fri, 9 Dec 2016 06:59:52 +0000 (08:59 +0200)
committerReedy <reedy@wikimedia.org>
Wed, 14 Dec 2016 22:19:53 +0000 (22:19 +0000)
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

index 5e40f43..c27c89c 100644 (file)
@@ -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();