MediaWiki
REL1_24
|
This class handles printing the history page for an article. More...
Public Member Functions | |
feed ($type) | |
Output a subscription feed listing recent edits to this page. | |
feedEmpty () | |
feedItem ($row) | |
Generate a FeedItem object from a given revision table row Borrows Recent Changes' feed generation functions for formatting; includes a diff to the previous revision (if any). | |
fetchRevisions ($limit, $offset, $direction) | |
Fetch an array of revisions, specified by a given limit, offset and direction. | |
getArticle () | |
Get the Article object we are working on. | |
getName () | |
Return the name of the action this object responds to. | |
onView () | |
Print the history page for an article. | |
requiresUnblock () | |
Whether this action can still be executed by a blocked user. | |
requiresWrite () | |
Whether this action requires the wiki not to be locked. | |
Public Attributes | |
array | $message |
Array of message keys and strings *. | |
const | DIR_NEXT = 1 |
const | DIR_PREV = 0 |
Protected Member Functions | |
getDescription () | |
Returns the description that goes below the <h1> tag. | |
getPageTitle () | |
Returns the name that goes in the <h1> page title. | |
Private Member Functions | |
preCacheMessages () | |
As we use the same small set of messages in various methods and that they are called often, we call them once and save them in $this->message. |
This class handles printing the history page for an article.
In order to be efficient, it uses timestamps rather than offsets for paging, to avoid costly LIMIT,offset queries.
Construct it by passing in an Article, and call $h->history() to print the history.
Definition at line 36 of file HistoryAction.php.
HistoryAction::feed | ( | $ | type | ) |
Output a subscription feed listing recent edits to this page.
string | $type | Feed type |
Definition at line 262 of file HistoryAction.php.
Definition at line 299 of file HistoryAction.php.
References Action\getTitle(), Action\msg(), text, and wfTimestamp().
HistoryAction::feedItem | ( | $ | row | ) |
Generate a FeedItem object from a given revision table row Borrows Recent Changes' feed generation functions for formatting; includes a diff to the previous revision (if any).
stdClass | array | $row | Database row |
Definition at line 318 of file HistoryAction.php.
HistoryAction::fetchRevisions | ( | $ | limit, |
$ | offset, | ||
$ | direction | ||
) |
Fetch an array of revisions, specified by a given limit, offset and direction.
This is now only used by the feeds. It was previously used by the main UI but that's now handled by the pager.
int | $limit | The limit number of revisions to get |
int | $offset | |
int | $direction | Either self::DIR_PREV or self::DIR_NEXT |
Definition at line 226 of file HistoryAction.php.
Get the Article object we are working on.
Definition at line 72 of file HistoryAction.php.
HistoryAction::getDescription | ( | ) | [protected] |
Returns the description that goes below the <h1> tag.
Reimplemented from Action.
Definition at line 58 of file HistoryAction.php.
References array(), Action\getTitle(), SpecialPage\getTitleFor(), Linker\linkKnown(), and Action\msg().
Return the name of the action this object responds to.
Reimplemented from Action.
Definition at line 42 of file HistoryAction.php.
HistoryAction::getPageTitle | ( | ) | [protected] |
Returns the name that goes in the <h1> page title.
Reimplemented from Action.
Definition at line 54 of file HistoryAction.php.
References Action\getTitle(), and Action\msg().
Print the history page for an article.
Reimplemented from FormlessAction.
Definition at line 93 of file HistoryAction.php.
HistoryAction::preCacheMessages | ( | ) | [private] |
As we use the same small set of messages in various methods and that they are called often, we call them once and save them in $this->message.
Definition at line 80 of file HistoryAction.php.
Whether this action can still be executed by a blocked user.
Reimplemented from Action.
Definition at line 50 of file HistoryAction.php.
Whether this action requires the wiki not to be locked.
Reimplemented from Action.
Definition at line 46 of file HistoryAction.php.
Array of message keys and strings *.
Definition at line 40 of file HistoryAction.php.
const HistoryAction::DIR_NEXT = 1 |
Definition at line 38 of file HistoryAction.php.
const HistoryAction::DIR_PREV = 0 |
Definition at line 37 of file HistoryAction.php.