[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/actions/ -> HistoryAction.php (summary)

Page history Split off from Article.php and Skin.php, 2003-12-22

File Size: 902 lines (26 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

HistoryAction:: (12 methods):
  getName()
  requiresWrite()
  requiresUnblock()
  getPageTitle()
  getDescription()
  getArticle()
  preCacheMessages()
  onView()
  fetchRevisions()
  feed()
  feedEmpty()
  feedItem()

HistoryPager:: (18 methods):
  __construct()
  getArticle()
  getSqlComment()
  getQueryInfo()
  getIndexField()
  formatRow()
  doBatchLookups()
  getStartBody()
  getRevisionButton()
  getEndBody()
  submitButton()
  historyLine()
  revLink()
  curLink()
  lastLink()
  diffButtons()
  preventClickjacking()
  getPreventClickjacking()


Class: HistoryAction  - X-Ref

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.

getName()   X-Ref
No description

requiresWrite()   X-Ref
No description

requiresUnblock()   X-Ref
No description

getPageTitle()   X-Ref
No description

getDescription()   X-Ref
No description

getArticle()   X-Ref
Get the Article object we are working on.

return: Page

preCacheMessages()   X-Ref
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


onView()   X-Ref
Print the history page for an article.


fetchRevisions( $limit, $offset, $direction )   X-Ref
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.

param: int $limit The limit number of revisions to get
param: int $offset
param: int $direction Either self::DIR_PREV or self::DIR_NEXT
return: ResultWrapper

feed( $type )   X-Ref
Output a subscription feed listing recent edits to this page.

param: string $type Feed type

feedEmpty()   X-Ref
No description

feedItem( $row )   X-Ref
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).

param: stdClass|array $row Database row
return: FeedItem

Class: HistoryPager  - X-Ref


__construct( $historyPage, $year = '', $month = '', $tagFilter = '', $conds = array()   X-Ref

param: HistoryAction $historyPage
param: string $year
param: string $month
param: string $tagFilter
param: array $conds

getArticle()   X-Ref
No description

getSqlComment()   X-Ref
No description

getQueryInfo()   X-Ref
No description

getIndexField()   X-Ref
No description

formatRow( $row )   X-Ref

param: stdClass $row
return: string

doBatchLookups()   X-Ref
No description

getStartBody()   X-Ref
Creates begin of history list with a submit button

return: string HTML output

getRevisionButton( $name, $msg )   X-Ref
No description

getEndBody()   X-Ref
No description

submitButton( $message, $attributes = array()   X-Ref
Creates a submit button

param: string $message Text of the submit button, will be escaped
param: array $attributes Attributes
return: string HTML output for the submit button

historyLine( $row, $next, $notificationtimestamp = false,$latest = false, $firstInList = false )   X-Ref
Returns a row from the history printout.

param: stdClass $row The database row corresponding to the previous line.
param: mixed $next The database row corresponding to the next line
param: bool|string $notificationtimestamp
param: bool $latest Whether this row corresponds to the page's latest revision.
param: bool $firstInList Whether this row corresponds to the first
return: string HTML output for the row

revLink( $rev )   X-Ref
Create a link to view this revision of the page

param: Revision $rev
return: string

curLink( $rev, $latest )   X-Ref
Create a diff-to-current link for this revision for this page

param: Revision $rev
param: bool $latest This is the latest revision of the page?
return: string

lastLink( $prevRev, $next )   X-Ref
Create a diff-to-previous link for this revision for this page.

param: Revision $prevRev The revision being displayed
param: stdClass|string|null $next The next revision in list (that is
return: string

diffButtons( $rev, $firstInList )   X-Ref
Create radio buttons for page history

param: Revision $rev
param: bool $firstInList Is this version the first one?
return: string HTML output for the radio buttons

preventClickjacking( $enable = true )   X-Ref
This is called if a write operation is possible from the generated HTML

param: bool $enable

getPreventClickjacking()   X-Ref
Get the "prevent clickjacking" flag

return: bool



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1