|
MediaWiki master
|
Inherits MediaWiki\Context\ContextSource.

Public Member Functions | |
| __construct ( $context, $linkRenderer=null, $flags=0) | |
| beginLogEventsList () | |
| endLogEventsList () | |
| logLine ( $row) | |
| showOptions ( $type='', $year=0, $month=0, $day=0, $username='') | |
| Show options for the log list. | |
| Public Member Functions inherited from MediaWiki\Context\ContextSource | |
| canUseWikiPage () | |
| Check whether a WikiPage object can be get with getWikiPage(). | |
| exportSession () | |
| Export the resolved user IP, HTTP headers, user ID, and session ID. | |
| getActionName () | |
| Get the action name for the current web request. | |
| getAuthority () | |
| getConfig () | |
| getContext () | |
| Get the base IContextSource object. | |
| getCsrfTokenSet () | |
| Get a repository to obtain and match CSRF tokens. | |
| getLanguage () | |
| getLanguageCode () | |
| getOutput () | |
| getRequest () | |
| getSkin () | |
| getTiming () | |
| getTitle () | |
| getUser () | |
| getWikiPage () | |
| Get the WikiPage object. | |
| msg ( $key,... $params) | |
| Get a Message object with context set Parameters are the same as wfMessage(). | |
| setContext (IContextSource $context) | |
Static Public Member Functions | |
| static | getBlockLogWarningBox (DatabaseBlockStore $blockStore, NamespaceInfo $namespaceInfo, MessageLocalizer $localizer, LinkRenderer $linkRenderer, $user, ?Title $title, array|callable $additionalParams=[], ?IContextSource $context=null) |
| static | getExcludeClause ( $db, $audience='public', ?Authority $performer=null) |
| SQL clause to skip forbidden log types for this user. | |
| static | isDeleted ( $row, $field) |
| static | showLogExtract (&$out, $types=[], $pages='', $user='', $param=[], ?IContextSource $context=null) |
| Show log extract. | |
| static | typeAction ( $row, $type, $action) |
| static | userCan ( $row, $field, Authority $performer) |
| Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted and/or restricted log type. | |
| static | userCanBitfield ( $bitfield, $field, Authority $performer) |
| Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted. | |
| static | userCanViewLogType ( $type, Authority $performer) |
| Determine if the current user is allowed to view a particular field of this log row, if it's marked as restricted log type. | |
Public Attributes | |
| int | $flags |
| const | NO_ACTION_LINK = 1 |
| const | NO_EXTRA_USER_LINKS = 2 |
| const | USE_CHECKBOXES = 4 |
Protected Member Functions | |
| getLinkRenderer () | |
Protected Attributes | |
| bool | $showTagEditUI |
Definition at line 53 of file LogEventsList.php.
| MediaWiki\Logging\LogEventsList::__construct | ( | $context, | |
| $linkRenderer = null, | |||
| $flags = 0 ) |
| IContextSource | $context | |
| LinkRenderer | null | $linkRenderer | |
| int | $flags | Can be a combination of self::NO_ACTION_LINK, self::NO_EXTRA_USER_LINKS or self::USE_CHECKBOXES. |
Definition at line 88 of file LogEventsList.php.
References $flags, MediaWiki\Context\ContextSource\getAuthority(), MediaWiki\MediaWikiServices\getInstance(), and MediaWiki\Context\ContextSource\setContext().
| MediaWiki\Logging\LogEventsList::beginLogEventsList | ( | ) |
Definition at line 375 of file LogEventsList.php.
| MediaWiki\Logging\LogEventsList::endLogEventsList | ( | ) |
Definition at line 382 of file LogEventsList.php.
|
static |
If the user associated with the current page is blocked, get a warning box with a block log extract in it. Otherwise, return null.
| DatabaseBlockStore | $blockStore | |
| NamespaceInfo | $namespaceInfo | |
| MessageLocalizer | $localizer | |
| LinkRenderer | $linkRenderer | |
| UserIdentity | false | null | $user | The user identity that may be blocked |
| Title | null | $title | The title being viewed. Pass null if the box should be shown regardless of the title. |
| array | callable | $additionalParams | Either:
|
When a callback is used, it receives a $data array with the following keys:
| ?IContextSource | $context | Context forwarded to ::showLogExtract(). When null, ::showLogExtract() falls back to RequestContext::getMain(). |
Definition at line 897 of file LogEventsList.php.
References MediaWiki\Title\NamespaceInfo\getCanonicalName(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\SpecialPage\SpecialPage\getTitleFor(), LIST_OR, MediaWiki\Language\MessageLocalizer\msg(), MediaWiki\Block\DatabaseBlockStore\newListFromTarget(), NS_USER, and showLogExtract().
|
static |
SQL clause to skip forbidden log types for this user.
| \\Wikimedia\\Rdbms\\IReadableDatabase | $db | |
| string | $audience | Public/user |
| Authority | null | $performer | User to check, required when audience isn't public |
| InvalidArgumentException |
Definition at line 844 of file LogEventsList.php.
References MediaWiki\MediaWikiServices\getInstance(), and MediaWiki\MainConfigNames\LogRestrictions.
|
protected |
Definition at line 107 of file LogEventsList.php.
References MediaWiki\MediaWikiServices\getInstance().
Referenced by logLine().
|
static |
| stdClass | $row | |
| int | $field | One of LogPage::DELETED_ACTION, ::DELETED_COMMENT, ::DELETED_USER, ::DELETED_RESTRICTED |
Definition at line 593 of file LogEventsList.php.
| MediaWiki\Logging\LogEventsList::logLine | ( | $row | ) |
| stdClass | $row | A single row from the result set |
Definition at line 390 of file LogEventsList.php.
References MediaWiki\Context\ContextSource\getContext(), MediaWiki\Context\ContextSource\getLanguage(), getLinkRenderer(), MediaWiki\SpecialPage\SpecialPage\getTitleValueFor(), and MediaWiki\Logging\DatabaseLogEntry\newFromRow().
|
static |
Show log extract.
Either with text and a box (set $msgKey) or without (don't set $msgKey)
| OutputPage | string | &$out | If passed an OutputPage, the log extract is added to its HTML. If passed a string (or anything else), the log extract is assigned to it by reference. |
| string | array | $types | Log types to show |
| string|PageReference|(string|PageReference)[] | $pages The page title(s) to show log entries for | |
| string | $user | The user who made the log entries |
| array | $param | Associative Array with the following additional options:
|
| ?IContextSource | $context | Context for message language and permission checks. Do not use it when $out is an OutputPage, since OutputPage provides its own context. |
Definition at line 628 of file LogEventsList.php.
References $flags, and MediaWiki\MediaWikiServices\getInstance().
Referenced by getBlockLogWarningBox().
| MediaWiki\Logging\LogEventsList::showOptions | ( | $type = '', | |
| $year = 0, | |||
| $month = 0, | |||
| $day = 0, | |||
| $username = '' ) |
Show options for the log list.
| string | $type | Log type |
| int | string | $year | Use 0 to start with no year preselected. |
| int | string | $month | A month in the 1..12 range. Use 0 to start with no month preselected. |
| int | string | $day | A day in the 1..31 range. Use 0 to start with no month preselected. |
| string | $username | Name of the filter-by performer, as typed in the form |
Definition at line 127 of file LogEventsList.php.
References MediaWiki\MainConfigNames\ActionFilteredLogs, MediaWiki\Context\ContextSource\getConfig(), MediaWiki\Context\ContextSource\getContext(), MediaWiki\SpecialPage\SpecialPage\getTitleFor(), StatusValue\isGood(), MediaWiki\MainConfigNames\MiserMode, and MediaWiki\Context\ContextSource\setContext().
|
static |
| stdClass | $row | |
| string | array | $type | |
| string | array | $action |
Definition at line 527 of file LogEventsList.php.
|
static |
Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted and/or restricted log type.
| stdClass | $row | |
| int | $field | One of LogPage::DELETED_ACTION, ::DELETED_COMMENT, ::DELETED_USER, ::DELETED_RESTRICTED |
| Authority | $performer | User to check |
Definition at line 547 of file LogEventsList.php.
References userCanBitfield(), and userCanViewLogType().
|
static |
Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted.
| int | $bitfield | Current field |
| int | $field | One of LogPage::DELETED_ACTION, ::DELETED_COMMENT, ::DELETED_USER, ::DELETED_RESTRICTED |
| Authority | $performer | User to check |
Definition at line 561 of file LogEventsList.php.
References MediaWiki\Logging\LogPage\DELETED_RESTRICTED, MediaWiki\Permissions\Authority\isAllowed(), and MediaWiki\Permissions\Authority\isAllowedAny().
Referenced by MediaWiki\Logging\LogFormatter\canView(), and userCan().
|
static |
Determine if the current user is allowed to view a particular field of this log row, if it's marked as restricted log type.
| string | $type | |
| Authority | $performer | User to check |
Definition at line 580 of file LogEventsList.php.
References MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Permissions\Authority\isAllowed(), and MediaWiki\MainConfigNames\LogRestrictions.
Referenced by userCan().
| int MediaWiki\Logging\LogEventsList::$flags |
Definition at line 59 of file LogEventsList.php.
Referenced by __construct(), and showLogExtract().
|
protected |
Definition at line 64 of file LogEventsList.php.
| const MediaWiki\Logging\LogEventsList::NO_ACTION_LINK = 1 |
Definition at line 54 of file LogEventsList.php.
| const MediaWiki\Logging\LogEventsList::NO_EXTRA_USER_LINKS = 2 |
Definition at line 55 of file LogEventsList.php.
| const MediaWiki\Logging\LogEventsList::USE_CHECKBOXES = 4 |
Definition at line 56 of file LogEventsList.php.