HistoryPager Class Reference
[Pager]

Inherits ReverseChronologicalPager.

Inherited by PageHistoryPager.

List of all members.

Public Member Functions

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

Public Attributes

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

Protected Attributes

 $oldIdChecked
 $preventClickjacking = false


Detailed Description

Definition at line 302 of file HistoryPage.php.


Constructor & Destructor Documentation

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


Member Function Documentation

HistoryPager::curLink ( rev,
latest 
)

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

Parameters:
$rev Revision
$latest Boolean: this is the latest revision of the page?
Returns:
String

Definition at line 619 of file HistoryPage.php.

References Revision::DELETED_TEXT, and IndexPager::getSkin().

Referenced by historyLine().

HistoryPager::diffButtons ( rev,
firstInList,
counter 
)

Create radio buttons for page history.

Parameters:
$rev Revision object
$firstInList Boolean: is this version the first one?
$counter Integer: a counter of what row number we're at, counted from the top row = 1.
Returns:
String: HTML output for the radio buttons

Definition at line 690 of file HistoryPage.php.

References $counter, Revision::DELETED_TEXT, Xml::element(), and IndexPager::getNumRows().

Referenced by historyLine().

HistoryPager::formatRow ( row  ) 

Abstract formatting function.

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

Reimplemented from IndexPager.

Definition at line 355 of file HistoryPage.php.

References $s, and historyLine().

HistoryPager::getArticle (  ) 

Definition at line 317 of file HistoryPage.php.

HistoryPager::getEndBody (  ) 

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

Reimplemented from IndexPager.

Definition at line 413 of file HistoryPage.php.

References $s, IndexPager::getNumRows(), and historyLine().

HistoryPager::getIndexField (  ) 

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.

Reimplemented from IndexPager.

Definition at line 351 of file HistoryPage.php.

HistoryPager::getPreventClickjacking (  ) 

Get the "prevent clickjacking" flag.

Definition at line 740 of file HistoryPage.php.

References preventClickjacking().

HistoryPager::getQueryInfo (  ) 

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

Reimplemented from IndexPager.

Definition at line 329 of file HistoryPage.php.

References ChangeTags::modifyDisplayQuery(), Revision::selectFields(), and wfRunHooks().

HistoryPager::getSqlComment (  ) 

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

Reimplemented from IndexPager.

Definition at line 321 of file HistoryPage.php.

HistoryPager::getStartBody (  ) 

Creates begin of history list with a submit button.

Returns:
string HTML output

Reimplemented from IndexPager.

Definition at line 373 of file HistoryPage.php.

References $s, $wgContLang, $wgOut, $wgScript, $wgUser, Xml::element(), Xml::hidden(), Xml::openElement(), preventClickjacking(), submitButton(), and wfMsg().

HistoryPager::historyLine ( row,
next,
counter = '',
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:
$row Object: the database row corresponding to the previous line.
$next Mixed: the database row corresponding to the next line.
$counter Integer: apparently a counter of what row number we're at, counted from the top row = 1.
$notificationtimestamp 
$latest Boolean: whether this row corresponds to the page's latest revision.
$firstInList Boolean: whether this row corresponds to the first displayed on this history page.
Returns:
String: HTML output for the row

Definition at line 471 of file HistoryPage.php.

References $classes, $counter, $s, $size, $wgLang, $wgUser, Xml::check(), curLink(), Revision::DELETED_RESTRICTED, Revision::DELETED_TEXT, diffButtons(), ChangesList::flag(), ChangeTags::formatSummaryRow(), IndexPager::getSkin(), lastLink(), preventClickjacking(), Html::rawElement(), revLink(), Xml::tags(), wfMsg(), wfMsgHtml(), and wfRunHooks().

Referenced by formatRow(), and getEndBody().

HistoryPager::lastLink ( prevRev,
next,
counter 
)

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

Parameters:
$prevRev Revision: the previous revision
$next Mixed: the newer revision
$counter Integer: what row on the history list this is
Returns:
String

Definition at line 645 of file HistoryPage.php.

References Revision::DELETED_TEXT, and IndexPager::getSkin().

Referenced by historyLine().

HistoryPager::preventClickjacking ( enable = true  ) 

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

Definition at line 733 of file HistoryPage.php.

Referenced by getPreventClickjacking(), getStartBody(), and historyLine().

HistoryPager::revLink ( rev  ) 

Create a link to view this revision of the page.

Parameters:
$rev Revision
Returns:
String

Definition at line 594 of file HistoryPage.php.

References $wgLang, Revision::DELETED_TEXT, IndexPager::getSkin(), and wfTimestamp().

Referenced by historyLine().

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

Creates a submit button.

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

Definition at line 449 of file HistoryPage.php.

References IndexPager::getNumRows().

Referenced by getStartBody().


Member Data Documentation

HistoryPager::$buttons

Definition at line 303 of file HistoryPage.php.

HistoryPager::$conds

Definition at line 303 of file HistoryPage.php.

Referenced by __construct().

HistoryPager::$counter

Definition at line 303 of file HistoryPage.php.

Referenced by diffButtons(), and historyLine().

HistoryPager::$historyPage

Definition at line 303 of file HistoryPage.php.

Referenced by __construct().

HistoryPager::$lastRow = false

Definition at line 303 of file HistoryPage.php.

HistoryPager::$oldIdChecked [protected]

Definition at line 304 of file HistoryPage.php.

HistoryPager::$preventClickjacking = false [protected]

Definition at line 305 of file HistoryPage.php.

HistoryPager::$title

Definition at line 303 of file HistoryPage.php.


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

Generated on Sat Apr 30 22:57:39 2011 for MediaWiki by  doxygen 1.5.9