MediaWiki
REL1_19
|
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 | |
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 18 of file HistoryAction.php.
HistoryAction::feed | ( | $ | type | ) |
Output a subscription feed listing recent edits to this page.
$type | String: feed type |
Definition at line 225 of file HistoryAction.php.
References $limit, $wgFeedClasses, $wgFeedLimit, FeedUtils\checkFeedOutput(), DIR_NEXT, feedEmpty(), feedItem(), fetchRevisions(), Action\getRequest(), Action\getTitle(), and wfMsgForContent().
Referenced by onView().
Definition at line 259 of file HistoryAction.php.
References Action\getOutput(), Action\getTitle(), wfMsgForContent(), and wfTimestamp().
Referenced by feed().
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).
$row | Object: database row |
Definition at line 278 of file HistoryAction.php.
References $title, $wgContLang, FeedUtils\formatDiffRow(), Action\getTitle(), FeedItem\stripComment(), and wfMsgForContent().
Referenced by feed().
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.
$limit | Integer: the limit number of revisions to get |
$offset | Integer |
$direction | Integer: either HistoryPage::DIR_PREV or HistoryPage::DIR_NEXT |
Definition at line 194 of file HistoryAction.php.
References $dbr, $limit, DIR_PREV, Revision\selectFields(), and wfGetDB().
Referenced by feed().
Get the Article object we are working on.
Definition at line 52 of file HistoryAction.php.
HistoryAction::getDescription | ( | ) | [protected] |
Returns the description that goes below the <h1> tag.
Reimplemented from Action.
Definition at line 38 of file HistoryAction.php.
References 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 22 of file HistoryAction.php.
HistoryAction::getPageTitle | ( | ) | [protected] |
Returns the name that goes in the <h1> page title.
Reimplemented from Action.
Definition at line 34 of file HistoryAction.php.
References Action\getTitle(), and Action\msg().
Print the history page for an article.
Reimplemented from FormlessAction.
Definition at line 74 of file HistoryAction.php.
References $out, $wgScript, $wgSquidMaxage, $wgUseFileCache, ChangeTags\buildTagFilterSelector(), Xml\checkLabel(), Xml\dateMenu(), feed(), Xml\fieldset(), Action\getContext(), Action\getOutput(), Action\getRequest(), Action\getTitle(), Html\hidden(), Action\msg(), HTMLFileCache\newFromTitle(), preCacheMessages(), LogEventsList\showLogExtract(), Xml\submitButton(), HTMLFileCache\useFileCache(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
Referenced by HistoryPage\history().
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 60 of file HistoryAction.php.
References Action\msg().
Referenced by onView().
Whether this action can still be executed by a blocked user.
Reimplemented from Action.
Definition at line 30 of file HistoryAction.php.
Whether this action requires the wiki not to be locked.
Reimplemented from Action.
Definition at line 26 of file HistoryAction.php.
const HistoryAction::DIR_NEXT = 1 |
Definition at line 20 of file HistoryAction.php.
Referenced by feed().
const HistoryAction::DIR_PREV = 0 |
Definition at line 19 of file HistoryAction.php.
Referenced by fetchRevisions().