|
MediaWiki master
|
Class to simplify the use of log pages. More...
Public Member Functions | |
| __construct ( $type, $rc=true, $udp='skipUDP') | |
| addEntry ( $action, $target, $comment, $params, $performer) | |
| Add a log entry. | |
| getComment () | |
| Get the comment from the last addEntry() call. | |
| getDescription () | |
| Description of this log type. | |
| getName () | |
| Name of the log. | |
| getRcComment () | |
| Get the RC comment from the last addEntry() call. | |
| getRcCommentIRC () | |
| Get the RC comment from the last addEntry() call for IRC. | |
| getRestriction () | |
| Returns the right needed to read this log type. | |
| isRestricted () | |
| Tells if this log is not viewable by all. | |
Static Public Member Functions | |
| static | actionText ( $type, $action, $title=null, $skin=null, $params=[], $filterWikilinks=false) |
| Generate text for a log entry. | |
| static | extractParams ( $blob) |
| Extract a parameter array from a blob. | |
| static | isLogType ( $type) |
| Is $type a valid log type. | |
| static | makeParamBlob ( $params) |
| Create a blob from a parameter array. | |
| static | validTypes () |
| Get the list of valid log types. | |
Public Attributes | |
| bool | $sendToUDP |
| bool | $updateRecentChanges |
| const | DELETED_ACTION = 1 |
| const | DELETED_COMMENT = 2 |
| const | DELETED_RESTRICTED = 8 |
| const | DELETED_USER = 4 |
| const | SUPPRESSED_ACTION = self::DELETED_ACTION | self::DELETED_RESTRICTED |
| const | SUPPRESSED_USER = self::DELETED_USER | self::DELETED_RESTRICTED |
Protected Member Functions | |
| saveContent () | |
Class to simplify the use of log pages.
The logs are now kept in a table which is easier to manage and trim than ever-growing wiki pages.
Definition at line 35 of file LogPage.php.
| MediaWiki\Logging\LogPage::__construct | ( | $type, | |
| $rc = true, | |||
| $udp = 'skipUDP' ) |
| string | $type | One of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move' |
| bool | $rc | Whether to update recent changes as well as the logging table |
| string | $udp | Pass 'UDP' to send to the UDP feed if NOT sent to RC |
Definition at line 86 of file LogPage.php.
|
static |
Generate text for a log entry.
Only LogFormatter should call this function.
| string | $type | Log type |
| string | $action | Log action |
| Title | null | $title | |
| Skin | null | $skin | Skin object or null. If null, we want to use the wiki content language, since that will go to the IRC feed. |
| array | $params | |
| bool | $filterWikilinks | Whether to filter wiki links |
Definition at line 237 of file LogPage.php.
References $wgLang, MediaWiki\MediaWikiServices\getInstance(), MediaWiki\MainConfigNames\LogActions, wfDebug(), and wfMessage().
Referenced by MediaWiki\Logging\LegacyLogFormatter\getActionMessage().
| MediaWiki\Logging\LogPage::addEntry | ( | $action, | |
| $target, | |||
| $comment, | |||
| $params, | |||
| $performer ) |
Add a log entry.
| string | $action | One of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'move_redir' |
| Title | $target | |
| string | null | $comment | Description associated |
| array | $params | Parameters passed later to wfMessage function |
| int | UserIdentity | $performer | The user doing the action, or their user id. Calling with user ID is deprecated since 1.36. |
Definition at line 338 of file LogPage.php.
References MediaWiki\MediaWikiServices\getInstance().
|
static |
Extract a parameter array from a blob.
| string | $blob |
Definition at line 393 of file LogPage.php.
| MediaWiki\Logging\LogPage::getComment | ( | ) |
Get the comment from the last addEntry() call.
Definition at line 199 of file LogPage.php.
| MediaWiki\Logging\LogPage::getDescription | ( | ) |
Description of this log type.
Definition at line 420 of file LogPage.php.
References MediaWiki\MediaWikiServices\getInstance(), MediaWiki\MainConfigNames\LogHeaders, and wfMessage().
| MediaWiki\Logging\LogPage::getName | ( | ) |
Name of the log.
Definition at line 406 of file LogPage.php.
References MediaWiki\MediaWikiServices\getInstance(), MediaWiki\MainConfigNames\LogNames, and wfMessage().
| MediaWiki\Logging\LogPage::getRcComment | ( | ) |
Get the RC comment from the last addEntry() call.
Definition at line 160 of file LogPage.php.
References wfMessage().
Referenced by MediaWiki\Logging\LogPage\saveContent().
| MediaWiki\Logging\LogPage::getRcCommentIRC | ( | ) |
Get the RC comment from the last addEntry() call for IRC.
Definition at line 180 of file LogPage.php.
References wfMessage().
Referenced by MediaWiki\Logging\LogPage\saveContent().
| MediaWiki\Logging\LogPage::getRestriction | ( | ) |
Returns the right needed to read this log type.
Definition at line 433 of file LogPage.php.
References MediaWiki\MediaWikiServices\getInstance(), and MediaWiki\MainConfigNames\LogRestrictions.
|
static |
Is $type a valid log type.
| string | $type | Log type to check |
Definition at line 220 of file LogPage.php.
| MediaWiki\Logging\LogPage::isRestricted | ( | ) |
Tells if this log is not viewable by all.
Definition at line 445 of file LogPage.php.
|
static |
Create a blob from a parameter array.
| array | $params |
Definition at line 383 of file LogPage.php.
|
protected |
Definition at line 95 of file LogPage.php.
References MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Logging\LogPage\getRcComment(), MediaWiki\Logging\LogPage\getRcCommentIRC(), MediaWiki\SpecialPage\SpecialPage\getTitleFor(), MediaWiki\MainConfigNames\LogRestrictions, and wfTimestampNow().
|
static |
Get the list of valid log types.
Definition at line 208 of file LogPage.php.
References MediaWiki\MediaWikiServices\getInstance(), and MediaWiki\MainConfigNames\LogTypes.
| bool MediaWiki\Logging\LogPage::$sendToUDP |
Definition at line 49 of file LogPage.php.
| bool MediaWiki\Logging\LogPage::$updateRecentChanges |
Definition at line 46 of file LogPage.php.
| const MediaWiki\Logging\LogPage::DELETED_ACTION = 1 |
Definition at line 36 of file LogPage.php.
Referenced by MediaWiki\Logging\BlockLogFormatter\getActionLinks(), MediaWiki\Logging\ContentModelLogFormatter\getActionLinks(), MediaWiki\Logging\DeleteLogFormatter\getActionLinks(), MediaWiki\Logging\LegacyLogFormatter\getActionLinks(), MediaWiki\Logging\MergeLogFormatter\getActionLinks(), MediaWiki\Logging\MoveLogFormatter\getActionLinks(), and MediaWiki\Logging\ProtectLogFormatter\getActionLinks().
| const MediaWiki\Logging\LogPage::DELETED_COMMENT = 2 |
Definition at line 37 of file LogPage.php.
| const MediaWiki\Logging\LogPage::DELETED_RESTRICTED = 8 |
Definition at line 39 of file LogPage.php.
Referenced by MediaWiki\Logging\LogEventsList\userCanBitfield().
| const MediaWiki\Logging\LogPage::DELETED_USER = 4 |
Definition at line 38 of file LogPage.php.
| const MediaWiki\Logging\LogPage::SUPPRESSED_ACTION = self::DELETED_ACTION | self::DELETED_RESTRICTED |
Definition at line 43 of file LogPage.php.
| const MediaWiki\Logging\LogPage::SUPPRESSED_USER = self::DELETED_USER | self::DELETED_RESTRICTED |
Definition at line 42 of file LogPage.php.