MediaWiki  REL1_22
LogEventsList Class Reference
Inheritance diagram for LogEventsList:
Collaboration diagram for LogEventsList:

List of all members.

Public Member Functions

 __construct ($context, $unused=null, $flags=0)
 Constructor.
 beginLogEventsList ()
 endLogEventsList ()
 getDisplayTitle ()
 Deprecated alias for getTitle(); do not use.
 getTypeSelector ()
 Returns log page selector.
 logLine ($row)
 showHeader ($type)
 Set page title and show header for this log type.
 showOptions ($types=array(), $user= '', $page= '', $pattern= '', $year= '', $month= '', $filter=null, $tagFilter= '')
 Show options for the log list.

Static Public Member Functions

static getExcludeClause ($db, $audience= 'public', User $user=null)
 SQL clause to skip forbidden log types for this user.
static isDeleted ($row, $field)
static showLogExtract (&$out, $types=array(), $page= '', $user= '', $param=array())
 Show log extract.
static typeAction ($row, $type, $action, $right= '')
static userCan ($row, $field, User $user=null)
 Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted.
static userCanBitfield ($bitfield, $field, User $user=null)
 Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted.

Public Attributes

 $flags
const NO_ACTION_LINK = 1
const NO_EXTRA_USER_LINKS = 2
const USE_REVDEL_CHECKBOXES = 4

Protected Attributes

Array $mDefaultQuery

Private Member Functions

 getDefaultQuery ()
 getExtraInputs ($types)
 getFilterLinks ($filter)
 getShowHideLinks ($row)
 getTitleInput ($title)
 getTitlePattern ($pattern)
 getTypeMenu ($queryTypes)
 getUserInput ($user)

Detailed Description

Definition at line 26 of file LogEventsList.php.


Constructor & Destructor Documentation

LogEventsList::__construct ( context,
unused = null,
flags = 0 
)

Constructor.

The first two parameters used to be $skin and $out, but now only a context is needed, that's why there's a second unused parameter.

Parameters:
$contextIContextSource Context to use; formerly it was Skin object.
$unusedvoid Unused; used to be an OutputPage object.
int$flagsflags; can be a combinaison of self::NO_ACTION_LINK, self::NO_EXTRA_USER_LINKS or self::USE_REVDEL_CHECKBOXES.

Definition at line 47 of file LogEventsList.php.


Member Function Documentation

Returns:
string

Definition at line 289 of file LogEventsList.php.

Returns:
string

Definition at line 296 of file LogEventsList.php.

Definition at line 182 of file LogEventsList.php.

References ContextSource\getRequest().

Deprecated alias for getTitle(); do not use.

Deprecated:
in 1.20; use getTitle() instead.
Returns:
Title object

Definition at line 64 of file LogEventsList.php.

static LogEventsList::getExcludeClause ( db,
audience = 'public',
User user = null 
) [static]

SQL clause to skip forbidden log types for this user.

Parameters:
$dbDatabaseBase
$audiencestring, public/user
$userUser object to check, or null to use $wgUser
Returns:
Mixed: string or false

Definition at line 593 of file LogEventsList.php.

Referenced by ApiQueryLogEvents\execute(), ApiQueryLogEvents\getCacheMode(), and LogPager\limitType().

LogEventsList::getExtraInputs ( types) [private]
Parameters:
$types
Returns:
string

Definition at line 273 of file LogEventsList.php.

LogEventsList::getFilterLinks ( filter) [private]
Parameters:
$filterArray
Returns:
String: Formatted HTML

Definition at line 152 of file LogEventsList.php.

LogEventsList::getShowHideLinks ( row) [private]
Parameters:
$rowRow
Returns:
string

Definition at line 344 of file LogEventsList.php.

LogEventsList::getTitleInput ( title) [private]
Parameters:
$titleString
Returns:
String: Formatted HTML

Definition at line 253 of file LogEventsList.php.

LogEventsList::getTitlePattern ( pattern) [private]
Parameters:
$pattern
Returns:
string Checkbox

Definition at line 263 of file LogEventsList.php.

LogEventsList::getTypeMenu ( queryTypes) [private]
Parameters:
$queryTypesArray
Returns:
String: Formatted HTML

Definition at line 200 of file LogEventsList.php.

Returns log page selector.

Returns:
XmlSelect
Since:
1.19

Definition at line 212 of file LogEventsList.php.

LogEventsList::getUserInput ( user) [private]
Parameters:
$userString
Returns:
String: Formatted HTML

Definition at line 243 of file LogEventsList.php.

static LogEventsList::isDeleted ( row,
field 
) [static]
Parameters:
$rowRow
$fieldInteger: one of DELETED_* bitfield constants
Returns:
Boolean

Definition at line 444 of file LogEventsList.php.

Referenced by ApiQueryLogEvents\extractRowInfo(), and RevDel_LogItem\getHTML().

Parameters:
$rowRow: a single row from the result set
Returns:
String: Formatted HTML list item

Definition at line 304 of file LogEventsList.php.

Set page title and show header for this log type.

Parameters:
$typeArray
Deprecated:
in 1.19

Definition at line 73 of file LogEventsList.php.

static LogEventsList::showLogExtract ( &$  out,
types = array(),
page = '',
user = '',
param = array() 
) [static]

Show log extract.

Either with text and a box (set $msgKey) or without (don't set $msgKey)

Parameters:
$outOutputPage|String-by-reference
string | array$typesLog types to show
string | Title$pageThe page title to show log entries for
string$userThe user who made the log entries
array$paramAssociative Array with the following additional options:
  • lim Integer Limit of items to show, default is 50
  • conds Array Extra conditions for the query (e.g. "log_action != 'revision'")
  • showIfEmpty boolean Set to false if you don't want any output in case the loglist is empty if set to true (default), "No matching items in log" is displayed if loglist is empty
  • msgKey Array If you want a nice box with a message, set this to the key of the message. First element is the message key, additional optional elements are parameters for the key that are processed with wfMessage
  • offset Set to overwrite offset parameter in WebRequest set to '' to unset offset
  • wrap String Wrap the message in html (usually something like "<div ...>$1</div>").
  • flags Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS)
  • useRequestParams boolean Set true to use Pager-related parameters in the WebRequest
Returns:
Integer Number of total log items (not limited by $lim)

Definition at line 470 of file LogEventsList.php.

Referenced by DeletedContributionsPage\__construct(), SpecialContributions\contributionsSub(), SpecialRevisionDelete\execute(), HistoryAction\onView(), SpecialBlock\postText(), SpecialMergeHistory\showHistory(), UserrightsPage\showLogFragment(), and MovePageForm\showLogFragment().

LogEventsList::showOptions ( types = array(),
user = '',
page = '',
pattern = '',
year = '',
month = '',
filter = null,
tagFilter = '' 
)

Show options for the log list.

Parameters:
string$typesor Array
$userString
$pageString
$patternString
$yearInteger: year
$monthInteger: month
$filter,:array
$tagFilter,:array?

Definition at line 99 of file LogEventsList.php.

static LogEventsList::typeAction ( row,
type,
action,
right = '' 
) [static]
Parameters:
$rowRow
$typeMixed: string/array
$actionMixed: string/array
$rightstring
Returns:
Boolean

Definition at line 385 of file LogEventsList.php.

Referenced by PopulateLogSearch\doDBUpdates().

static LogEventsList::userCan ( row,
field,
User user = null 
) [static]

Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted.

Parameters:
$rowRow
$fieldInteger
$userUser object to check, or null to use $wgUser
Returns:
Boolean

Definition at line 408 of file LogEventsList.php.

Referenced by RevDel_LogItem\canView().

static LogEventsList::userCanBitfield ( bitfield,
field,
User user = null 
) [static]

Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted.

Parameters:
$bitfieldInteger (current field)
$fieldInteger
$userUser object to check, or null to use $wgUser
Returns:
Boolean

Definition at line 421 of file LogEventsList.php.


Member Data Documentation

LogEventsList::$flags

Definition at line 31 of file LogEventsList.php.

Array LogEventsList::$mDefaultQuery [protected]

Definition at line 35 of file LogEventsList.php.

Definition at line 27 of file LogEventsList.php.

Definition at line 28 of file LogEventsList.php.

Definition at line 29 of file LogEventsList.php.

Referenced by SpecialLog\show().


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