jenkins-bot has submitted this change and it was merged.

Change subject: Add visibility to DifferenceEngine methods
......................................................................


Add visibility to DifferenceEngine methods

Change-Id: I415719442ca1778be36f173067d4b090fbe9265a
---
M includes/diff/DifferenceEngine.php
1 file changed, 28 insertions(+), 27 deletions(-)

Approvals:
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index 52eb003..414b9f8 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -105,8 +105,9 @@
         * @param bool $refreshCache If set, refreshes the diff cache
         * @param bool $unhide If set, allow viewing deleted revs
         */
-       function __construct( $context = null, $old = 0, $new = 0, $rcid = 0,
-               $refreshCache = false, $unhide = false ) {
+       public function __construct( $context = null, $old = 0, $new = 0, $rcid 
= 0,
+               $refreshCache = false, $unhide = false
+       ) {
                if ( $context instanceof IContextSource ) {
                        $this->setContext( $context );
                }
@@ -122,14 +123,14 @@
        /**
         * @param bool $value
         */
-       function setReducedLineNumbers( $value = true ) {
+       public function setReducedLineNumbers( $value = true ) {
                $this->mReducedLineNumbers = $value;
        }
 
        /**
         * @return Language
         */
-       function getDiffLang() {
+       public function getDiffLang() {
                if ( $this->mDiffLang === null ) {
                        # Default language in which the diff text is written.
                        $this->mDiffLang = $this->getTitle()->getPageLanguage();
@@ -141,14 +142,14 @@
        /**
         * @return bool
         */
-       function wasCacheHit() {
+       public function wasCacheHit() {
                return $this->mCacheHit;
        }
 
        /**
         * @return int
         */
-       function getOldid() {
+       public function getOldid() {
                $this->loadRevisionIds();
 
                return $this->mOldid;
@@ -157,7 +158,7 @@
        /**
         * @return bool|int
         */
-       function getNewid() {
+       public function getNewid() {
                $this->loadRevisionIds();
 
                return $this->mNewid;
@@ -171,7 +172,7 @@
         *
         * @return mixed URL or false
         */
-       function deletedLink( $id ) {
+       public function deletedLink( $id ) {
                if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
                        $dbr = wfGetDB( DB_SLAVE );
                        $row = $dbr->selectRow( 'archive', '*',
@@ -198,7 +199,7 @@
         *
         * @return string Wikitext fragment
         */
-       function deletedIdMarker( $id ) {
+       public function deletedIdMarker( $id ) {
                $link = $this->deletedLink( $id );
                if ( $link ) {
                        return "[$link $id]";
@@ -227,7 +228,7 @@
                        $this->getLanguage()->listToText( $missing ), count( 
$missing ) );
        }
 
-       function showDiffPage( $diffOnly = false ) {
+       public function showDiffPage( $diffOnly = false ) {
                wfProfileIn( __METHOD__ );
 
                # Allow frames except in certain special cases
@@ -536,7 +537,7 @@
        /**
         * Show the new revision of the page.
         */
-       function renderNewRevision() {
+       public function renderNewRevision() {
                wfProfileIn( __METHOD__ );
                $out = $this->getOutput();
                $revHeader = $this->getRevisionHeader( $this->mNewRev );
@@ -619,7 +620,7 @@
         *
         * @return bool
         */
-       function showDiff( $otitle, $ntitle, $notice = '' ) {
+       public function showDiff( $otitle, $ntitle, $notice = '' ) {
                $diff = $this->getDiff( $otitle, $ntitle, $notice );
                if ( $diff === false ) {
                        $this->showMissingRevision();
@@ -636,7 +637,7 @@
        /**
         * Add style sheets and supporting JS for diff display.
         */
-       function showDiffStyle() {
+       public function showDiffStyle() {
                $this->getOutput()->addModuleStyles( 
'mediawiki.action.history.diff' );
        }
 
@@ -649,7 +650,7 @@
         *
         * @return mixed
         */
-       function getDiff( $otitle, $ntitle, $notice = '' ) {
+       public function getDiff( $otitle, $ntitle, $notice = '' ) {
                $body = $this->getDiffBody();
                if ( $body === false ) {
                        return false;
@@ -784,7 +785,7 @@
         * @throws MWException If old or new content is not an instance of 
TextContent.
         * @return bool|string
         */
-       function generateContentDiffBody( Content $old, Content $new ) {
+       public function generateContentDiffBody( Content $old, Content $new ) {
                if ( !( $old instanceof TextContent ) ) {
                        throw new MWException( "Diff not implemented for " . 
get_class( $old ) . "; " .
                                "override generateContentDiffBody to fix this." 
);
@@ -810,7 +811,7 @@
         * @return bool|string
         * @deprecated since 1.21, use generateContentDiffBody() instead!
         */
-       function generateDiffBody( $otext, $ntext ) {
+       public function generateDiffBody( $otext, $ntext ) {
                ContentHandler::deprecated( __METHOD__, "1.21" );
 
                return $this->generateTextDiffBody( $otext, $ntext );
@@ -826,7 +827,7 @@
         *
         * @return bool|string
         */
-       function generateTextDiffBody( $otext, $ntext ) {
+       public function generateTextDiffBody( $otext, $ntext ) {
                global $wgExternalDiffEngine, $wgContLang;
 
                wfProfileIn( __METHOD__ );
@@ -932,7 +933,7 @@
         *
         * @return mixed
         */
-       function localiseLineNumbers( $text ) {
+       public function localiseLineNumbers( $text ) {
                return preg_replace_callback(
                        '/<!--LINE (\d+)-->/',
                        array( &$this, 'localiseLineNumbersCb' ),
@@ -940,7 +941,7 @@
                );
        }
 
-       function localiseLineNumbersCb( $matches ) {
+       public function localiseLineNumbersCb( $matches ) {
                if ( $matches[1] === '1' && $this->mReducedLineNumbers ) {
                        return '';
                }
@@ -953,7 +954,7 @@
         *
         * @return string
         */
-       function getMultiNotice() {
+       public function getMultiNotice() {
                if ( !is_object( $this->mOldRev ) || !is_object( $this->mNewRev 
) ) {
                        return '';
                } elseif ( !$this->mOldPage->equals( $this->mNewPage ) ) {
@@ -1076,7 +1077,7 @@
         *
         * @return string
         */
-       function addHeader( $diff, $otitle, $ntitle, $multi = '', $notice = '' 
) {
+       public function addHeader( $diff, $otitle, $ntitle, $multi = '', 
$notice = '' ) {
                // shared.css sets diff in interface language/dir, but the 
actual content
                // is often in a different language, mostly the page content 
language/dir
                $tableClass = 'diff diff-contentalign-' . htmlspecialchars( 
$this->getDiffLang()->alignStart() );
@@ -1125,7 +1126,7 @@
         * Use specified text instead of loading from the database
         * @deprecated since 1.21, use setContent() instead.
         */
-       function setText( $oldText, $newText ) {
+       public function setText( $oldText, $newText ) {
                ContentHandler::deprecated( __METHOD__, "1.21" );
 
                $oldContent = ContentHandler::makeContent( $oldText, 
$this->getTitle() );
@@ -1138,7 +1139,7 @@
         * Use specified text instead of loading from the database
         * @since 1.21
         */
-       function setContent( Content $oldContent, Content $newContent ) {
+       public function setContent( Content $oldContent, Content $newContent ) {
                $this->mOldContent = $oldContent;
                $this->mNewContent = $newContent;
 
@@ -1151,7 +1152,7 @@
         * (Defaults to page content language).
         * @since 1.19
         */
-       function setTextLanguage( $lang ) {
+       public function setTextLanguage( $lang ) {
                $this->mDiffLang = wfGetLangObj( $lang );
        }
 
@@ -1221,7 +1222,7 @@
         *
         * @return bool
         */
-       function loadRevisionData() {
+       public function loadRevisionData() {
                if ( $this->mRevisionsLoaded ) {
                        return true;
                }
@@ -1301,7 +1302,7 @@
         *
         * @return bool
         */
-       function loadText() {
+       public function loadText() {
                if ( $this->mTextLoaded == 2 ) {
                        return true;
                }
@@ -1335,7 +1336,7 @@
         *
         * @return bool
         */
-       function loadNewText() {
+       public function loadNewText() {
                if ( $this->mTextLoaded >= 1 ) {
                        return true;
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/115347
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I415719442ca1778be36f173067d4b090fbe9265a
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aude <aude.w...@gmail.com>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to