MobileFrontend
MobileoptimisedfrontendforMediaWiki
InlineDifferenceEngine Class Reference

Extends the basic DifferenceEngine from core to enable inline difference view using only one column instead of two column diff system. More...

+ Inheritance diagram for InlineDifferenceEngine:
+ Collaboration diagram for InlineDifferenceEngine:

Public Member Functions

 isDeletedDiff ()
 Checks whether the given Revision was deleted. More...
 
 isSuppressedDiff ()
 Checks whether the given Revision was deleted or if it is delete restricted. More...
 
 isUserAllowedToSee ()
 Checks whether the current user has permission to view the old and current revisions. More...
 
 showDiffPage ( $diffOnly=false)
 Render the inline difference between two revisions using InlineDiffEngine. More...
 
 isHiddenFromUser ()
 Checks whether the diff should be hidden from the current user This is based on whether the user is allowed to see it and whether the flag unhide is set to allow viewing deleted revisions. More...
 
 getWarningMessageText ()
 Returns warning messages in situations where a revision cannot be viewed by a user explaining to them why. More...
 
 generateContentDiffBody (Content $old, Content $new)
 @inheritDoc
 
 generateTextDiffBody ( $otext, $ntext)
 Creates an inline diff. More...
 
 getPatrolledLink ()
 Create a getter function for the patrol link in Mobile Diff. More...
 

Protected Member Functions

 getDiffBodyCacheKeyParams ()
 @inheritDoc
 

Detailed Description

Extends the basic DifferenceEngine from core to enable inline difference view using only one column instead of two column diff system.

Member Function Documentation

◆ generateTextDiffBody()

InlineDifferenceEngine::generateTextDiffBody (   $otext,
  $ntext 
)

Creates an inline diff.

Parameters
string$otextOld content
string$ntextNew content
Exceptions

◆ getPatrolledLink()

InlineDifferenceEngine::getPatrolledLink ( )

Create a getter function for the patrol link in Mobile Diff.

FIXME: This shouldn't be needed, but markPatrolledLink is protected in DifferenceEngine

Returns
String

Reimplemented in MockInlineDifferenceEngine.

◆ getWarningMessageText()

InlineDifferenceEngine::getWarningMessageText ( )

Returns warning messages in situations where a revision cannot be viewed by a user explaining to them why.

Returns empty string when the revision can be viewed.

Returns
string

◆ isDeletedDiff()

InlineDifferenceEngine::isDeletedDiff ( )

Checks whether the given Revision was deleted.

Todo:
FIXME: Upstream to DifferenceEngine - refactor showDiffPage
Returns
bool

◆ isHiddenFromUser()

InlineDifferenceEngine::isHiddenFromUser ( )

Checks whether the diff should be hidden from the current user This is based on whether the user is allowed to see it and whether the flag unhide is set to allow viewing deleted revisions.

Todo:
FIXME: Upstream to DifferenceEngine - refactor showDiffPage
Returns
bool

◆ isSuppressedDiff()

InlineDifferenceEngine::isSuppressedDiff ( )

Checks whether the given Revision was deleted or if it is delete restricted.

FIXME: Upstream to DifferenceEngine - refactor showDiffPage

Returns
bool

◆ isUserAllowedToSee()

InlineDifferenceEngine::isUserAllowedToSee ( )

Checks whether the current user has permission to view the old and current revisions.

Todo:
FIXME: Upstream to DifferenceEngine - refactor showDiffPage
Returns
bool

◆ showDiffPage()

InlineDifferenceEngine::showDiffPage (   $diffOnly = false)

Render the inline difference between two revisions using InlineDiffEngine.

Exceptions
MWExceptionIf the content is not an instance of TextContent and wgContentHandlerTextFallback was set to 'fail'.
Parameters
bool$diffOnly

The documentation for this class was generated from the following file: