MediaWiki  REL1_19
ContribsPager Class Reference

Pager for Special:Contributions. More...

Inheritance diagram for ContribsPager:
Collaboration diagram for ContribsPager:

List of all members.

Public Member Functions

 __construct (IContextSource $context, array $options)
 doBatchLookups ()
 Called from getBody(), before getStartBody() is called and after doQuery() was called.
 formatRow ($row)
 Generates each row in the contributions list.
 getDatabase ()
 Get the Database object in use.
 getDefaultQuery ()
 Get an array of query parameters that should be put into self-links.
 getEndBody ()
 getIndexField ()
 This function should be overridden to return the name of the index fi- eld.
 getNamespaceCond ()
 getPreventClickjacking ()
 getQueryInfo ()
 This function should be overridden to provide all parameters needed for the main paged query.
 getSqlComment ()
 Overwrite Pager function and return a helpful comment.
 getStartBody ()
 getUserCond ()

Public Attributes

 $mDb
 $mDefaultDirection = true
 $mDefaultDirection gives the direction to use when sorting results: false for ascending, true for descending.
 $messages
 $namespace = ''
 $preventClickjacking = false
 $target

Protected Member Functions

 preventClickjacking ()

Private Member Functions

 getParentLengths (array $revIds)
 Do a batched query to get the parent revision lengths.

Detailed Description

Pager for Special:Contributions.

Definition at line 539 of file SpecialContributions.php.


Constructor & Destructor Documentation

ContribsPager::__construct ( IContextSource context,
array $  options 
)

Definition at line 545 of file SpecialContributions.php.

References SpecialContributions\__construct(), false, SpecialPage\msg(), and wfGetDB().

Here is the call graph for this function:


Member Function Documentation

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 680 of file SpecialContributions.php.

Generates each row in the contributions list.

Contributions which are marked "top" are currently on top of the history. For these contributions, a [rollback] link is shown for users with roll- back privileges. The rollback link restores the most recent version that was not written by the target user.

Todo:
This would probably look a lot nicer in a table.

Reimplemented from IndexPager.

Definition at line 750 of file SpecialContributions.php.

References $comment, $page, $user, Revision\DELETED_TEXT, Revision\DELETED_USER, ChangesList\flag(), Linker\formatRevisionSize(), ChangeTags\formatSummaryRow(), Linker\generateRollback(), SpecialPage\getLanguage(), Linker\getRevDeleteLink(), SpecialPage\getUser(), Linker\link(), Linker\linkKnown(), SpecialPage\msg(), Title\newFromRow(), Linker\revComment(), ChangesList\showCharacterDifference(), Linker\userLink(), Linker\userTalkLink(), wfProfileIn(), wfProfileOut(), and wfRunHooks().

Here is the call graph for this function:

Get the Database object in use.

Returns:
DatabaseBase

Definition at line 879 of file SpecialContributions.php.

Get an array of query parameters that should be put into self-links.

By default, all parameters passed in the URL are used, except for a short blacklist.

Returns:
Associative array

Reimplemented from IndexPager.

Definition at line 571 of file SpecialContributions.php.

Returns:
string

Reimplemented from IndexPager.

Definition at line 736 of file SpecialContributions.php.

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 676 of file SpecialContributions.php.

Definition at line 652 of file SpecialContributions.php.

References MWNamespace\getAssociated().

Here is the call graph for this function:

ContribsPager::getParentLengths ( array $  revIds) [private]

Do a batched query to get the parent revision lengths.

Definition at line 709 of file SpecialContributions.php.

References $res, wfProfileIn(), and wfProfileOut().

Here is the call graph for this function:

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 577 of file SpecialContributions.php.

References $user, Revision\DELETED_USER, SpecialPage\getUser(), ChangeTags\modifyDisplayQuery(), Revision\pageJoinCond(), Revision\selectFields(), Revision\selectUserFields(), Revision\SUPPRESSED_USER, Revision\userJoinCond(), and wfRunHooks().

Here is the call graph for this function:

Overwrite Pager function and return a helpful comment.

Reimplemented from IndexPager.

Definition at line 886 of file SpecialContributions.php.

Returns:
string

Reimplemented from IndexPager.

Definition at line 729 of file SpecialContributions.php.

Definition at line 622 of file SpecialContributions.php.

References User\idFromName(), and IP\isIPAddress().

Here is the call graph for this function:

Definition at line 894 of file SpecialContributions.php.


Member Data Documentation

ContribsPager::$mDb

Reimplemented from IndexPager.

Definition at line 542 of file SpecialContributions.php.

ContribsPager::$mDefaultDirection = true

$mDefaultDirection gives the direction to use when sorting results: false for ascending, true for descending.

If $mIsBackwards is set, we start from the opposite end, but we still sort the page itself according to $mDefaultDirection. E.g., if $mDefaultDirection is false but we're going backwards, we'll display the last page of results, but the last result will be at the bottom, not the top.

Like $mIndexField, $mDefaultDirection will be a single value even if the class supports multiple default directions for different order types.

Reimplemented from ReverseChronologicalPager.

Definition at line 540 of file SpecialContributions.php.

ContribsPager::$messages

Definition at line 541 of file SpecialContributions.php.

ContribsPager::$namespace = ''

Definition at line 542 of file SpecialContributions.php.

ContribsPager::$preventClickjacking = false

Definition at line 543 of file SpecialContributions.php.

ContribsPager::$target

Definition at line 541 of file SpecialContributions.php.


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