MediaWiki  REL1_19
LogEventsList Class Reference

List of all members.

Public Member Functions

 __construct ($skin, $out, $flags=0)
 beginLogEventsList ()
 endLogEventsList ()
 getContext ()
 getDisplayTitle ()
 Get the Title object of the page the links should point to.
 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')
 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

Protected Attributes

 $mDefaultQuery
 $message

Private Member Functions

 getDefaultQuery ()
 getExtraInputs ($types)
 getFilterLinks ($filter)
 getShowHideLinks ($row)
 getTitleInput ($title)
 getTitlePattern ($pattern)
 getTypeMenu ($queryTypes)
 getUserInput ($user)
 logActionLinks ($row, $title, $paramArray, &$comment)
 : split up!
 logTimestamp (LogEntry $entry)
 preCacheMessages ()
 As we use the same small set of messages in various methods and that they are called often, we call them once and save them in $this->message.

Private Attributes

 $out
 $skin

Detailed Description

Definition at line 26 of file LogEventsList.php.


Constructor & Destructor Documentation

LogEventsList::__construct ( skin,
out,
flags = 0 
)

Definition at line 51 of file LogEventsList.php.

References $flags, $out, $skin, and preCacheMessages().

Here is the call graph for this function:


Member Function Documentation

Returns:
string

Definition at line 316 of file LogEventsList.php.

Returns:
string

Definition at line 323 of file LogEventsList.php.

Definition at line 216 of file LogEventsList.php.

Definition at line 190 of file LogEventsList.php.

Referenced by getFilterLinks().

Here is the caller graph for this function:

Get the Title object of the page the links should point to.

This is NOT the Title of the page the entries should be restricted to.

Returns:
Title object

Definition at line 212 of file LogEventsList.php.

Referenced by getFilterLinks().

Here is the caller graph for this function:

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

SQL clause to skip forbidden log types for this user.

Parameters:
$dbDatabaseBase
$audiencestring, public/user
Returns:
Mixed: string or false

Definition at line 733 of file LogEventsList.php.

References $wgLogRestrictions, and $wgUser.

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

Here is the caller graph for this function:

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

Definition at line 299 of file LogEventsList.php.

References $user, Xml\inputLabel(), IP\isIPAddress(), User\newFromName(), and wfMsg().

Referenced by showOptions().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 159 of file LogEventsList.php.

References $messages, $wgLang, getDefaultQuery(), getDisplayTitle(), Html\hidden(), Linker\link(), and wfMsgHtml().

Referenced by showOptions().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 503 of file LogEventsList.php.

References $wgUser, LogPage\DELETED_RESTRICTED, SpecialPage\getTitleFor(), Linker\revDeleteLink(), and Linker\revDeleteLinkDisabled().

Referenced by logLine().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 279 of file LogEventsList.php.

References $title, Xml\inputLabel(), and wfMsg().

Referenced by showOptions().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 289 of file LogEventsList.php.

References Xml\checkLabel(), and wfMsg().

Referenced by showOptions().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 224 of file LogEventsList.php.

References getTypeSelector().

Referenced by showOptions().

Here is the call graph for this function:

Here is the caller graph for this function:

Returns log page selector.

Returns:
XmlSelect
Since:
1.19

Definition at line 236 of file LogEventsList.php.

References $page, $wgUser, and LogPage\validTypes().

Referenced by getTypeMenu().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 269 of file LogEventsList.php.

References $user, Xml\inputLabel(), and wfMsg().

Referenced by showOptions().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 598 of file LogEventsList.php.

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

Here is the caller graph for this function:

LogEventsList::logActionLinks ( row,
title,
paramArray,
&$  comment 
) [private]

: split up!

Parameters:
$row
Title$title
Array$paramArray
$comment
Returns:
String

Definition at line 375 of file LogEventsList.php.

References $comment, $title, $wgUser, LogPage\DELETED_ACTION, RevisionDeleter\getLogLinks(), SpecialPage\getTitleFor(), Linker\link(), Title\newFromText(), wfMsgForContent(), and wfRunHooks().

Referenced by logLine().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 331 of file LogEventsList.php.

References $comment, $title, LogPage\extractParams(), ChangeTags\formatSummaryRow(), getShowHideLinks(), logActionLinks(), logTimestamp(), LogFormatter\newFromEntry(), DatabaseLogEntry\newFromRow(), and Xml\tags().

Here is the call graph for this function:

LogEventsList::logTimestamp ( LogEntry entry) [private]

Definition at line 360 of file LogEventsList.php.

References $wgLang, LogEntry\getTimestamp(), and wfTimestamp().

Referenced by logLine().

Here is the call graph for this function:

Here is the caller graph for this function:

As we use the same small set of messages in various methods and that they are called often, we call them once and save them in $this->message.

Definition at line 62 of file LogEventsList.php.

References $messages, and wfMsgExt().

Referenced by __construct().

Here is the call graph for this function:

Here is the caller graph for this function:

Set page title and show header for this log type.

Parameters:
$typeArray
Deprecated:
in 1.19

Definition at line 79 of file LogEventsList.php.

References $page, LogPage\isLogType(), wfDeprecated(), and wfMsgExt().

Here is the call graph for this function:

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
$typesString|Array Log types to show
$pageString|Title The page title to show log entries for
$userString The user who made the log entries
$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 wfMsgExt and option 'parse'
  • offset Set to overwrite offset parameter in $wgRequest 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)
Returns:
Integer Number of total log items (not limited by $lim)

Definition at line 623 of file LogEventsList.php.

References $flags, $out, $page, $user, RequestContext\getMain(), Html\rawElement(), wfMsgExt(), and wfRunHooks().

Referenced by Article\confirmDelete(), SpecialContributions\contributionsSub(), Article\delete(), Article\doDelete(), SpecialRevisionDelete\execute(), DeletedContributionsPage\getSubTitle(), SpecialUpload\getUploadForm(), HistoryAction\onView(), SpecialBlock\postText(), MovePageForm\showForm(), EditPage\showHeader(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), EditPage\showIntro(), FileDeleteForm\showLogEntries(), UserrightsPage\showLogFragment(), MovePageForm\showLogFragment(), and Article\showMissingArticle().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Show options for the log list.

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

Definition at line 104 of file LogEventsList.php.

References $page, $title, $user, $wgMiserMode, $wgScript, ChangeTags\buildTagFilterSelector(), Xml\dateMenu(), Xml\fieldset(), getExtraInputs(), getFilterLinks(), SpecialPage\getTitleFor(), getTitleInput(), getTitlePattern(), getTypeMenu(), getUserInput(), Html\hidden(), Xml\submitButton(), Xml\tags(), and wfMsg().

Here is the call graph for this function:

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

Definition at line 539 of file LogEventsList.php.

References $wgUser.

Referenced by PopulateLogSearch\doDBUpdates().

Here is the caller graph for this function:

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 562 of file LogEventsList.php.

References $user, and userCanBitfield().

Referenced by RevDel_LogItem\canView().

Here is the call graph for this function:

Here is the caller graph for this function:

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 575 of file LogEventsList.php.

References $user, $wgUser, LogPage\DELETED_RESTRICTED, and wfDebug().

Referenced by LogFormatter\canView(), ChangesList\userCan(), and userCan().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

LogEventsList::$flags

Definition at line 39 of file LogEventsList.php.

Referenced by __construct(), and showLogExtract().

LogEventsList::$mDefaultQuery [protected]

Definition at line 49 of file LogEventsList.php.

LogEventsList::$message [protected]

Definition at line 44 of file LogEventsList.php.

LogEventsList::$out [private]

Definition at line 38 of file LogEventsList.php.

Referenced by __construct(), and showLogExtract().

LogEventsList::$skin [private]

Definition at line 33 of file LogEventsList.php.

Referenced by __construct().

Definition at line 27 of file LogEventsList.php.

Definition at line 28 of file LogEventsList.php.


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