MediaWiki  REL1_19
LogPager Class Reference
Inheritance diagram for LogPager:
Collaboration diagram for LogPager:

List of all members.

Public Member Functions

 __construct ($list, $types=array(), $performer= '', $title= '', $pattern= '', $conds=array(), $year=false, $month=false, $tagFilter= '')
 Constructor.
 doQuery ()
 Do the query, using information from the object context.
 formatRow ($row)
 Abstract formatting function.
 getDefaultQuery ()
 Get an array of query parameters that should be put into self-links.
 getFilterParams ()
 getIndexField ()
 This function should be overridden to return the name of the index fi- eld.
 getMonth ()
 getPage ()
 getPattern ()
 getPerformer ()
 getQueryInfo ()
 Constructs the most part of the query.
 getStartBody ()
 Hook into getBody(), allows text to be inserted at the start.
 getTagFilter ()
 getType ()
 getYear ()

Public Attributes

 $mLogEventsList
 $pattern = ''
 $performer = ''
 $title = ''

Protected Member Functions

 hasEqualsClause ($field)
 Checks if $this->mConds has $field matched to a *single* value.

Private Member Functions

 limitPerformer ($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.
 limitType ($types)
 Set the log reader to return only entries of the given type.

Private Attributes

 $typeCGI = ''
 $types = array()

Detailed Description

Definition at line 29 of file LogPager.php.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
$listLogEventsList
$typesString or Array: log types to show
$performerString: the user who made the log entries
$titleString|Title: the page title the log entries are for
$patternString: do a prefix search rather than an exact title match
$condsArray: extra conditions for the query
$yearInteger: the year to start from
$monthInteger: the month to start from
$tagFilterString: tag

Definition at line 47 of file LogPager.php.

References $pattern, $performer, $title, $types, ReverseChronologicalPager\getDateCond(), limitPerformer(), limitTitle(), and limitType().

Here is the call graph for this function:


Member Function Documentation

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 350 of file LogPager.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()

Parameters:
$rowObject: database row
Returns:
String

Reimplemented from IndexPager.

Definition at line 312 of file LogPager.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 61 of file LogPager.php.

Definition at line 71 of file LogPager.php.

References $wgFilterLogTypes, ContextSource\getRequest(), and ContextSource\getUser().

Here is the call graph for this function:

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 287 of file LogPager.php.

Definition at line 342 of file LogPager.php.

Returns:
string

Definition at line 330 of file LogPager.php.

Definition at line 334 of file LogPager.php.

Returns:
string

Definition at line 323 of file LogPager.php.

Constructs the most part of the query.

Extra conditions are sprinkled in all over this class.

Returns:
array

Reimplemented from IndexPager.

Definition at line 220 of file LogPager.php.

References $options, DatabaseLogEntry\getSelectQueryData(), hasEqualsClause(), and ChangeTags\modifyDisplayQuery().

Here is the call graph for this function:

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.

Returns:
String

Reimplemented from IndexPager.

Definition at line 291 of file LogPager.php.

References $lb, $title, IndexPager\getNumRows(), Title\makeTitleSafe(), LogFormatter\newFromRow(), wfProfileIn(), and wfProfileOut().

Here is the call graph for this function:

Definition at line 346 of file LogPager.php.

Definition at line 316 of file LogPager.php.

Definition at line 338 of file LogPager.php.

LogPager::hasEqualsClause ( field) [protected]

Checks if $this->mConds has $field matched to a *single* value.

Parameters:
$field
Returns:
bool

Definition at line 280 of file LogPager.php.

Referenced by getQueryInfo().

Here is the caller graph for this function:

LogPager::limitPerformer ( name) [private]

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

Parameters:
$nameString: (In)valid user name

Definition at line 135 of file LogPager.php.

References $user, LogPage\DELETED_USER, ContextSource\getUser(), User\idFromName(), Title\makeTitleSafe(), and LogPage\SUPPRESSED_USER.

Referenced by __construct().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
$pageString or Title object: Title name
$patternString

Definition at line 170 of file LogPager.php.

References $page, $pattern, $title, $user, $wgMiserMode, LogPage\DELETED_ACTION, ContextSource\getUser(), Title\newFromText(), and LogPage\SUPPRESSED_ACTION.

Referenced by __construct().

Here is the call graph for this function:

Here is the caller graph for this function:

LogPager::limitType ( types) [private]

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

Type restrictions enforced here

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

Definition at line 96 of file LogPager.php.

References $types, $wgLogRestrictions, LogEventsList\getExcludeClause(), and ContextSource\getUser().

Referenced by __construct().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

LogPager::$mLogEventsList

Definition at line 32 of file LogPager.php.

LogPager::$pattern = ''

Definition at line 30 of file LogPager.php.

Referenced by __construct(), and limitTitle().

LogPager::$performer = ''

Definition at line 30 of file LogPager.php.

Referenced by __construct().

LogPager::$title = ''

Definition at line 30 of file LogPager.php.

Referenced by __construct(), getStartBody(), and limitTitle().

LogPager::$typeCGI = '' [private]

Definition at line 31 of file LogPager.php.

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

Definition at line 30 of file LogPager.php.

Referenced by __construct(), and limitType().


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