MediaWiki  REL1_20
HistoryPager Class Reference
Inheritance diagram for HistoryPager:
Collaboration diagram for HistoryPager:

List of all members.

Public Member Functions

 __construct ($historyPage, $year= '', $month= '', $tagFilter= '', $conds=array())
 curLink ($rev, $latest)
 Create a diff-to-current link for this revision for this page.
 diffButtons ($rev, $firstInList)
 Create radio buttons for page history.
 doBatchLookups ()
 Called from getBody(), before getStartBody() is called and after doQuery() was called.
 formatRow ($row)
 Abstract formatting function.
 getArticle ()
 getEndBody ()
 Hook into getBody() for the end of the list.
 getIndexField ()
 This function should be overridden to return the name of the index fi- eld.
 getPreventClickjacking ()
 Get the "prevent clickjacking" flag.
 getQueryInfo ()
 This function should be overridden to provide all parameters needed for the main paged query.
 getSqlComment ()
 Get some text to go in brackets in the "function name" part of the SQL comment.
 getStartBody ()
 Creates begin of history list with a submit button.
 historyLine ($row, $next, $notificationtimestamp=false, $latest=false, $firstInList=false)
 Returns a row from the history printout.
 lastLink ($prevRev, $next)
 Create a diff-to-previous link for this revision for this page.
 preventClickjacking ($enable=true)
 This is called if a write operation is possible from the generated HTML.
 revLink ($rev)
 Create a link to view this revision of the page.
 submitButton ($message, $attributes=array())
 Creates a submit button.

Public Attributes

 $buttons
 $conds
 $counter
 $historyPage
 $lastRow = false

Protected Attributes

 $oldIdChecked
array $parentLens
 $preventClickjacking = false

Private Member Functions

 getRevisionButton ($name, $msg)

Detailed Description

Definition at line 331 of file HistoryAction.php.


Constructor & Destructor Documentation

HistoryPager::__construct ( historyPage,
year = '',
month = '',
tagFilter = '',
conds = array() 
)

Definition at line 339 of file HistoryAction.php.

References $conds, $historyPage, and ReverseChronologicalPager\getDateCond().


Member Function Documentation

HistoryPager::curLink ( rev,
latest 
)

Create a diff-to-current link for this revision for this page.

Parameters:
$revRevision
$latestBoolean: this is the latest revision of the page?
Returns:
String

Definition at line 705 of file HistoryAction.php.

HistoryPager::diffButtons ( rev,
firstInList 
)

Create radio buttons for page history.

Parameters:
$revRevision object
$firstInListBoolean: is this version the first one?
Returns:
String: HTML output for the radio buttons

Definition at line 772 of file HistoryAction.php.

Called from getBody(), before getStartBody() is called and after doQuery() was called.

This will be called only if there are rows in the result set.

Returns:
void

Reimplemented from IndexPager.

Definition at line 402 of file HistoryAction.php.

References Revision\getParentLengths().

Abstract formatting function.

This should return an HTML string representing the result row $row. Rows will be concatenated and returned by getBody()

Parameters:
$rowObject: database row
Returns:
String

Reimplemented from IndexPager.

Definition at line 388 of file HistoryAction.php.

References $s, ContextSource\getTitle(), ContextSource\getUser(), and historyLine().

Definition at line 348 of file HistoryAction.php.

Hook into getBody() for the end of the list.

Returns:
String

Reimplemented from IndexPager.

Definition at line 473 of file HistoryAction.php.

References $s, IndexPager\getNumRows(), ContextSource\getTitle(), ContextSource\getUser(), and historyLine().

This function should be overridden to return the name of the index fi- eld.

If the pager supports multiple orders, it may return an array of 'querykey' => 'indexfield' pairs, so that a request with &count=querykey will use indexfield to sort. In this case, the first returned key is the default.

Needless to say, it's really not a good idea to use a non-unique index for this! That won't page right.

Returns:
string|Array

Reimplemented from IndexPager.

Definition at line 384 of file HistoryAction.php.

Get the "prevent clickjacking" flag.

Returns:
bool

Definition at line 823 of file HistoryAction.php.

This function should be overridden to provide all parameters needed for the main paged query.

It returns an associative array with the following elements: tables => Table(s) for passing to Database::select() fields => Field(s) for passing to Database::select(), may be * conds => WHERE conditions options => option array join_conds => JOIN conditions

Returns:
Array

Reimplemented from IndexPager.

Definition at line 360 of file HistoryAction.php.

References ContextSource\getWikiPage(), ChangeTags\modifyDisplayQuery(), Revision\selectFields(), Revision\selectUserFields(), Revision\userJoinCond(), and wfRunHooks().

HistoryPager::getRevisionButton ( name,
msg 
) [private]

Definition at line 458 of file HistoryAction.php.

References Html\element(), ContextSource\msg(), and preventClickjacking().

Get some text to go in brackets in the "function name" part of the SQL comment.

Returns:
String

Reimplemented from IndexPager.

Definition at line 352 of file HistoryAction.php.

Creates begin of history list with a submit button.

Returns:
string HTML output

Reimplemented from IndexPager.

Definition at line 429 of file HistoryAction.php.

HistoryPager::historyLine ( row,
next,
notificationtimestamp = false,
latest = false,
firstInList = false 
)

Returns a row from the history printout.

Todo:
document some more, and maybe clean up the code (some params redundant?)
Parameters:
$rowObject: the database row corresponding to the previous line.
$nextMixed: the database row corresponding to the next line. (chronologically previous)
$notificationtimestamp
$latestBoolean: whether this row corresponds to the page's latest revision.
$firstInListBoolean: whether this row corresponds to the first displayed on this history page.
Returns:
String: HTML output for the row

Definition at line 531 of file HistoryAction.php.

Referenced by formatRow(), and getEndBody().

HistoryPager::lastLink ( prevRev,
next 
)

Create a diff-to-previous link for this revision for this page.

Parameters:
$prevRevRevision: the previous revision
$nextMixed: the newer revision
Returns:
String

Definition at line 729 of file HistoryAction.php.

HistoryPager::preventClickjacking ( enable = true)

This is called if a write operation is possible from the generated HTML.

Definition at line 815 of file HistoryAction.php.

Referenced by getRevisionButton().

Create a link to view this revision of the page.

Parameters:
$revRevision
Returns:
String

Definition at line 679 of file HistoryAction.php.

HistoryPager::submitButton ( message,
attributes = array() 
)

Creates a submit button.

Parameters:
$messageString: text of the submit button, will be escaped
$attributesArray: attributes
Returns:
String: HTML output for the submit button

Definition at line 510 of file HistoryAction.php.


Member Data Documentation

HistoryPager::$buttons

Definition at line 332 of file HistoryAction.php.

HistoryPager::$conds

Definition at line 332 of file HistoryAction.php.

Referenced by __construct().

HistoryPager::$counter

Definition at line 332 of file HistoryAction.php.

HistoryPager::$historyPage

Definition at line 332 of file HistoryAction.php.

Referenced by __construct().

HistoryPager::$lastRow = false

Definition at line 332 of file HistoryAction.php.

HistoryPager::$oldIdChecked [protected]

Definition at line 333 of file HistoryAction.php.

array HistoryPager::$parentLens [protected]

Definition at line 337 of file HistoryAction.php.

HistoryPager::$preventClickjacking = false [protected]

Definition at line 334 of file HistoryAction.php.


The documentation for this class was generated from the following file: