ILIAS
Release_3_10_x_branch Revision 61812
|
Public Member Functions | |
DifferenceEngine ($titleObj=null, $old=0, $new=0, $rcid=0) | |
#@- | |
showDiffPage ($diffOnly=false) | |
renderNewRevision () | |
Show the new revision of the page. | |
showFirstRevision () | |
Show the first revision of an article. | |
showDiff ($otitle, $ntitle) | |
Get the diff text, send it to $wgOut Returns false if the diff could not be generated, otherwise returns true. | |
getDiff ($otitle, $ntitle) | |
Get diff table, including header Note that the interface has changed, it's no longer static. | |
getDiffBody () | |
Get the diff table body, without header Results are cached Returns false on error. | |
generateDiffBody ($otext, $ntext) | |
Generate a diff, no caching $otext and $ntext must be already segmented. | |
localiseLineNumbers ($text) | |
Replace line numbers with the text in the user's language. | |
localiseLineNumbersCb ($matches) | |
getMultiNotice () | |
If there are revisions between the ones being compared, return a note saying so. | |
addHeader ($diff, $otitle, $ntitle, $multi= '') | |
Add the header to a diff body. | |
setText ($oldText, $newText) | |
Use specified text instead of loading from the database. | |
loadRevisionData () | |
Load revision metadata for the specified articles. | |
loadText () | |
Load the text of the revisions, as well as revision data. | |
loadNewText () | |
Load the text of the new revision, not the old one. |
Data Fields | |
$mNewid | |
$mTitle | |
$mOldtitle | |
$mNewtitle | |
$mPagetitle | |
$mOldtext | |
$mNewtext | |
$mOldPage | |
$mNewPage | |
$mRcidMarkPatrolled | |
$mOldRev | |
$mNewRev | |
$mRevisionsLoaded = false | |
$mTextLoaded = 0 |
Private Attributes | |
$mOldid | |
#@+ |
Definition at line 17 of file class.WordLevelDiff.php.
DifferenceEngine::addHeader | ( | $diff, | |
$otitle, | |||
$ntitle, | |||
$multi = '' |
|||
) |
Add the header to a diff body.
Definition at line 485 of file class.WordLevelDiff.php.
Referenced by getDiff().
DifferenceEngine::DifferenceEngine | ( | $titleObj = null , |
|
$old = 0 , |
|||
$new = 0 , |
|||
$rcid = 0 |
|||
) |
#@-
Constructor
$titleObj | Title object that the diff is associated with |
$old | Integer: old ID we want to show and diff with. |
$new | String: either 'prev' or 'next'. |
$rcid | Integer: ??? FIXME (default 0) |
Definition at line 38 of file class.WordLevelDiff.php.
DifferenceEngine::generateDiffBody | ( | $otext, | |
$ntext | |||
) |
Generate a diff, no caching $otext and $ntext must be already segmented.
Definition at line 371 of file class.WordLevelDiff.php.
References $cmd.
Referenced by getDiffBody().
DifferenceEngine::getDiff | ( | $otitle, | |
$ntitle | |||
) |
Get diff table, including header Note that the interface has changed, it's no longer static.
Returns false on error
Definition at line 305 of file class.WordLevelDiff.php.
References addHeader(), getDiffBody(), and getMultiNotice().
Referenced by showDiff().
DifferenceEngine::getDiffBody | ( | ) |
Get the diff table body, without header Results are cached Returns false on error.
Definition at line 320 of file class.WordLevelDiff.php.
References generateDiffBody(), loadText(), and localiseLineNumbers().
Referenced by getDiff().
DifferenceEngine::getMultiNotice | ( | ) |
If there are revisions between the ones being compared, return a note saying so.
Definition at line 459 of file class.WordLevelDiff.php.
References $n.
Referenced by getDiff().
DifferenceEngine::loadNewText | ( | ) |
Load the text of the new revision, not the old one.
Definition at line 636 of file class.WordLevelDiff.php.
References loadRevisionData().
Referenced by renderNewRevision(), and showFirstRevision().
DifferenceEngine::loadRevisionData | ( | ) |
Load revision metadata for the specified articles.
If newid is 0, then compare the old article in oldid to the current article; if oldid is 0, then compare the current article to the immediately previous one (ignoring the value of newid).
If oldid is false, leave the corresponding revision object set to false. This is impossible via ordinary user input, and is provided for API convenience.
Definition at line 527 of file class.WordLevelDiff.php.
References $t, $timestamp, and wfMsg().
Referenced by loadNewText(), loadText(), and showDiffPage().
DifferenceEngine::loadText | ( | ) |
Load the text of the revisions, as well as revision data.
Definition at line 606 of file class.WordLevelDiff.php.
References loadRevisionData().
Referenced by getDiffBody().
DifferenceEngine::localiseLineNumbers | ( | $text | ) |
Replace line numbers with the text in the user's language.
Definition at line 445 of file class.WordLevelDiff.php.
Referenced by getDiffBody().
DifferenceEngine::localiseLineNumbersCb | ( | $matches | ) |
Definition at line 450 of file class.WordLevelDiff.php.
DifferenceEngine::renderNewRevision | ( | ) |
Show the new revision of the page.
Definition at line 203 of file class.WordLevelDiff.php.
References loadNewText(), and wfMsg().
Referenced by showDiffPage().
DifferenceEngine::setText | ( | $oldText, | |
$newText | |||
) |
Use specified text instead of loading from the database.
Definition at line 511 of file class.WordLevelDiff.php.
DifferenceEngine::showDiff | ( | $otitle, | |
$ntitle | |||
) |
Get the diff text, send it to $wgOut Returns false if the diff could not be generated, otherwise returns true.
Definition at line 288 of file class.WordLevelDiff.php.
References getDiff(), and wfMsg().
Referenced by showDiffPage().
DifferenceEngine::showDiffPage | ( | $diffOnly = false | ) |
Definition at line 69 of file class.WordLevelDiff.php.
References $t, exit, loadRevisionData(), renderNewRevision(), showDiff(), showFirstRevision(), and wfMsg().
DifferenceEngine::showFirstRevision | ( | ) |
Show the first revision of an article.
Uses normal diff headers in contrast to normal "old revision" display style.
Definition at line 236 of file class.WordLevelDiff.php.
References $t, exit, loadNewText(), and wfMsg().
Referenced by showDiffPage().
DifferenceEngine::$mNewid |
Definition at line 21 of file class.WordLevelDiff.php.
DifferenceEngine::$mNewPage |
Definition at line 24 of file class.WordLevelDiff.php.
DifferenceEngine::$mNewRev |
Definition at line 26 of file class.WordLevelDiff.php.
DifferenceEngine::$mNewtext |
Definition at line 23 of file class.WordLevelDiff.php.
DifferenceEngine::$mNewtitle |
Definition at line 22 of file class.WordLevelDiff.php.
|
private |
#@+
Definition at line 21 of file class.WordLevelDiff.php.
DifferenceEngine::$mOldPage |
Definition at line 24 of file class.WordLevelDiff.php.
DifferenceEngine::$mOldRev |
Definition at line 26 of file class.WordLevelDiff.php.
DifferenceEngine::$mOldtext |
Definition at line 23 of file class.WordLevelDiff.php.
DifferenceEngine::$mOldtitle |
Definition at line 22 of file class.WordLevelDiff.php.
DifferenceEngine::$mPagetitle |
Definition at line 22 of file class.WordLevelDiff.php.
DifferenceEngine::$mRcidMarkPatrolled |
Definition at line 25 of file class.WordLevelDiff.php.
DifferenceEngine::$mRevisionsLoaded = false |
Definition at line 27 of file class.WordLevelDiff.php.
DifferenceEngine::$mTextLoaded = 0 |
Definition at line 28 of file class.WordLevelDiff.php.
DifferenceEngine::$mTitle |
Definition at line 21 of file class.WordLevelDiff.php.