LogPager Class Reference
[Pager]

Inherits ReverseChronologicalPager.

List of all members.

Public Member Functions

 __construct ($list, $types=array(), $user= '', $title= '', $pattern= '', $conds=array(), $year=false, $month=false, $tagFilter= '')
 constructor
 getDefaultQuery ()
 Get an array of query parameters that should be put into self-links.
 getFilterParams ()
 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.
 getStartBody ()
 Hook into getBody(), allows text to be inserted at the start.
 formatRow ($row)
 Abstract formatting function.
 getType ()
 getUser ()
 getPage ()
 getPattern ()
 getYear ()
 getMonth ()
 getTagFilter ()
 doQuery ()
 Do the query, using information from the object context.

Public Attributes

 $mLogEventsList

Private Member Functions

 limitType ($types)
 Set the log reader to return only entries of the given type.
 limitUser ($name)
 Set the log reader to return only entries by the given user.
 limitTitle ($page, $pattern)
 Set the log reader to return only entries affecting the given page.

Private Attributes

 $types = array()
 $user = ''
 $title = ''
 $pattern = ''
 $typeCGI = ''


Detailed Description

Definition at line 731 of file LogEventsList.php.


Constructor & Destructor Documentation

LogPager::__construct ( list,
types = array(),
user = '',
title = '',
pattern = '',
conds = array(),
year = false,
month = false,
tagFilter = '' 
)

constructor

Parameters:
$list LogEventsList
$types String or Array log types to show
$user String The user who made the log entries
$title String The page title the log entries are for
$pattern String Do a prefix search rather than an exact title match
$conds Array Extra conditions for the query
$year Integer The year to start from
$month Integer The month to start from

Definition at line 747 of file LogEventsList.php.

References $title, and LogEventsList::__construct().


Member Function Documentation

LogPager::doQuery (  ) 

Do the query, using information from the object context.

This function has been kept minimal to make it overridable if necessary, to allow for result sets formed from multiple DB queries.

Reimplemented from IndexPager.

Definition at line 998 of file LogEventsList.php.

LogPager::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 966 of file LogEventsList.php.

LogPager::getDefaultQuery (  ) 

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.

Reimplemented from IndexPager.

Definition at line 762 of file LogEventsList.php.

References LogEventsList::getDefaultQuery().

LogPager::getFilterParams (  ) 

Definition at line 772 of file LogEventsList.php.

References $wgFilterLogTypes, and $wgRequest.

LogPager::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 945 of file LogEventsList.php.

LogPager::getMonth (  ) 

Definition at line 990 of file LogEventsList.php.

LogPager::getPage (  ) 

Definition at line 978 of file LogEventsList.php.

LogPager::getPattern (  ) 

Definition at line 982 of file LogEventsList.php.

LogPager::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 900 of file LogEventsList.php.

References $options, and ChangeTags::modifyDisplayQuery().

LogPager::getStartBody (  ) 

Hook into getBody(), allows text to be inserted at the start.

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

Reimplemented from IndexPager.

Definition at line 949 of file LogEventsList.php.

References Title::makeTitleSafe(), wfProfileIn(), and wfProfileOut().

LogPager::getTagFilter (  ) 

Definition at line 994 of file LogEventsList.php.

LogPager::getType (  ) 

Definition at line 970 of file LogEventsList.php.

LogPager::getUser (  ) 

Definition at line 974 of file LogEventsList.php.

LogPager::getYear (  ) 

Definition at line 986 of file LogEventsList.php.

LogPager::limitTitle ( page,
pattern 
) [private]

Set the log reader to return only entries affecting the given page.

(For the block and rights logs, this is a user page.)

Parameters:
$page String: Title name as text
$pattern String

Definition at line 861 of file LogEventsList.php.

References $page, $title, $wgMiserMode, LogPage::DELETED_ACTION, Title::newFromText(), and LogPage::SUPPRESSED_ACTION.

LogPager::limitType ( types  )  [private]

Set the log reader to return only entries of the given type.

Type restrictions enforced here

Parameters:
$types String or array: Log types ('upload', 'delete', etc); empty string means no restriction

Definition at line 796 of file LogEventsList.php.

References $wgLogRestrictions, and LogEventsList::getExcludeClause().

LogPager::limitUser ( name  )  [private]

Set the log reader to return only entries by the given user.

Parameters:
$name String: (In)valid user name

Definition at line 827 of file LogEventsList.php.

References $name, LogPage::DELETED_USER, User::idFromName(), Title::makeTitleSafe(), and LogPage::SUPPRESSED_USER.


Member Data Documentation

LogPager::$mLogEventsList

Definition at line 734 of file LogEventsList.php.

LogPager::$pattern = '' [private]

Definition at line 732 of file LogEventsList.php.

LogPager::$title = '' [private]

Definition at line 732 of file LogEventsList.php.

LogPager::$typeCGI = '' [private]

Definition at line 733 of file LogEventsList.php.

LogPager::$types = array() [private]

Definition at line 732 of file LogEventsList.php.

LogPager::$user = '' [private]

Definition at line 732 of file LogEventsList.php.


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

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