MediaWiki
REL1_22
|
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 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 248 of file HistoryAction.php.
References $limit, as, FeedUtils\checkFeedOutput(), DIR_NEXT, feedEmpty(), feedItem(), fetchRevisions(), Action\getRequest(), Action\getTitle(), global, and Action\msg().
Referenced by onView().
Definition at line 281 of file HistoryAction.php.
References Action\getTitle(), Action\msg(), text, 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 300 of file HistoryAction.php.
References $rev, $title, $wgContLang, FeedUtils\formatDiffRow(), Action\getTitle(), global, Action\msg(), and FeedItem\stripComment().
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 212 of file HistoryAction.php.
References $dbr, $dirs, $limit, array(), DIR_PREV, Action\exists(), Action\getTitle(), list, page, Revision\selectFields(), and wfGetDB().
Referenced by feed().
Get the Article object we are working on.
Definition at line 70 of file HistoryAction.php.
References page.
HistoryAction::getDescription | ( | ) | [protected] |
Returns the description that goes below the <h1> tag.
Reimplemented from Action.
Definition at line 56 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 40 of file HistoryAction.php.
HistoryAction::getPageTitle | ( | ) | [protected] |
Returns the name that goes in the <h1> page title.
Reimplemented from Action.
Definition at line 52 of file HistoryAction.php.
References Action\getTitle(), and Action\msg().
Print the history page for an article.
Reimplemented from FormlessAction.
Definition at line 91 of file HistoryAction.php.
References $cache, $out, array(), ChangeTags\buildTagFilterSelector(), Xml\checkLabel(), Xml\dateMenu(), feed(), Xml\fieldset(), format, Action\getContext(), MWTimestamp\getLocalInstance(), Action\getOutput(), Action\getRequest(), Action\getTitle(), Action\getUser(), global, Html\hidden(), Action\msg(), HTMLFileCache\newFromTitle(), page, preCacheMessages(), LogEventsList\showLogExtract(), Xml\submitButton(), text, 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 78 of file HistoryAction.php.
References array(), as, message, and Action\msg().
Referenced by onView().
Whether this action can still be executed by a blocked user.
Reimplemented from Action.
Definition at line 48 of file HistoryAction.php.
Whether this action requires the wiki not to be locked.
Reimplemented from Action.
Definition at line 44 of file HistoryAction.php.
const HistoryAction::DIR_NEXT = 1 |
Definition at line 38 of file HistoryAction.php.
Referenced by feed().
const HistoryAction::DIR_PREV = 0 |
Definition at line 37 of file HistoryAction.php.
Referenced by fetchRevisions().