Inherited by PageHistory.
Public Member Functions | |
__construct ($article) | |
Construct a new HistoryPage. | |
getArticle () | |
getTitle () | |
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. | |
history () | |
Print the history page for an article. | |
fetchRevisions ($limit, $offset, $direction) | |
Fetch an array of revisions, specified by a given limit, offset and direction. | |
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). | |
Public Attributes | |
const | DIR_PREV = 0 |
const | DIR_NEXT = 1 |
$article | |
$title | |
$skin |
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 HistoryPage.php.
HistoryPage::__construct | ( | $ | article | ) |
Construct a new HistoryPage.
$article | Article |
Definition at line 29 of file HistoryPage.php.
References $article, $wgUser, and preCacheMessages().
HistoryPage::feed | ( | $ | type | ) |
Output a subscription feed listing recent edits to this page.
$type | String: feed type |
Definition at line 213 of file HistoryPage.php.
References $wgFeedClasses, $wgFeedLimit, $wgRequest, FeedUtils::checkFeedOutput(), DIR_NEXT, feedEmpty(), feedItem(), fetchRevisions(), and wfMsgForContent().
Referenced by history().
HistoryPage::feedEmpty | ( | ) |
Definition at line 245 of file HistoryPage.php.
References $wgOut, wfMsgForContent(), and wfTimestamp().
Referenced by feed().
HistoryPage::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 265 of file HistoryPage.php.
References $title, $wgContLang, FeedUtils::formatDiffRow(), FeedItem::stripComment(), and wfMsgForContent().
Referenced by feed().
HistoryPage::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 184 of file HistoryPage.php.
References $dbr, $dirs, DIR_PREV, Revision::selectFields(), and wfGetDB().
Referenced by feed().
HistoryPage::getArticle | ( | ) |
Definition at line 37 of file HistoryPage.php.
HistoryPage::getTitle | ( | ) |
Definition at line 41 of file HistoryPage.php.
HistoryPage::history | ( | ) |
Print the history page for an article.
Definition at line 63 of file HistoryPage.php.
References $action, $wgOut, $wgRequest, $wgScript, ChangeTags::buildTagFilterSelector(), Xml::checkLabel(), Xml::dateMenu(), feed(), Xml::fieldset(), SpecialPage::getTitleFor(), Xml::hidden(), LogEventsList::showLogExtract(), Xml::submitButton(), wfMsg(), wfMsgHtml(), wfProfileIn(), wfProfileOut(), and wfRunHooks().
HistoryPage::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.
Definition at line 49 of file HistoryPage.php.
References $msg, and wfMsgExt().
Referenced by __construct().
HistoryPage::$article |
HistoryPage::$skin |
Definition at line 22 of file HistoryPage.php.
HistoryPage::$title |
const HistoryPage::DIR_NEXT = 1 |
const HistoryPage::DIR_PREV = 0 |