(Translated by https://www.hiragana.jp/)
Manual:$wgLogActions: Difference between revisions - MediaWiki Jump to content

Manual:$wgLogActions: Difference between revisions

From mediawiki.org
Content deleted Content added
m translation tweaks
Recommend $wgLogActionsHandlers
 
(10 intermediate revisions by 4 users not shown)
Line 4: Line 4:
|version_min=1.7.0
|version_min=1.7.0
|rev_introduced=14373
|rev_introduced=14373
|section=Special pages
|section=Logging
|range=(<translate><!--T:1--> array of strings</translate>)
|range=(<translate><!--T:1--> array of strings</translate>)
|default=''see below''
|default=''<translate><!--T:12--> see below</translate>''
|summary=<translate><!--T:2--> Lists the message key string for formatting individual events of each type and action when listed in the logs.</translate>
|summary={{Translations:Manual:$wgLogActions/4/{{PAGELANGUAGE}}}}
}}
}}
<translate>
<translate>
== Details == <!--T:3-->
== Details == <!--T:3-->
</translate>
<translate><!--T:4--> Lists the message key string for formatting individual events of each type and action when listed in the logs.</translate>
<translate><!--T:5--> Extensions with custom log types may add to this array.</translate>
<translate><!--T:6--> Keys are in the same format as <tvar|LogActionsHandlers><code>{{ll|Manual:$wgLogActionsHandlers|$wgLogActionsHandlers}}</code></>.</translate>


New log types should be defined using <code>{{ll|Manual:$wgLogActionsHandlers|$wgLogActionsHandlers}}</code> instead, which allows for better localisation of the log messages (see [[phab:T26620|T26620]]).
<!--T:4-->
Lists the message key string for formatting individual events of each type and action when listed in the logs.</translate>
<translate>
<!--T:5-->
Extensions with custom log types may add to this array.</translate>
<translate>
<!--T:6-->
Same as <tvar|LogActionsHandlers><code>{{ll|Manual:$wgLogActionsHandlers|$wgLogActionsHandlers}}</code></> but without function callbacks as values.


<translate>
<!--T:7-->
<!--T:7-->
See <tvar|1>{{ll|Manual:Logging to Special:Log}}</> for more information about logging in MediaWiki.
See <tvar|1>{{ll|Manual:Logging to Special:Log}}</> for more information about logging in MediaWiki.
Line 28: Line 26:


{{MW 1.27|+}}
{{MW 1.27|+}}
<source lang="php">
<syntaxhighlight lang="php">
/**
/**
* Lists the message key string for formatting individual events of each
* <translate nowrap><!--T:13--> Lists the message key string for formatting individual events of each</translate>
* type and action when listed in the logs.
* <translate nowrap><!--T:14--> type and action when listed in the logs.</translate>
*
*
* Extensions with custom log types may add to this array.
* <translate nowrap><!--T:15--> Extensions with custom log types may add to this array.</translate>
*/
*/
$wgLogActions = [];
$wgLogActions = [];
</syntaxhighlight>
</source>


{{collapse top|title=<translate><!--T:11--> Older versions</translate>}}
{{collapse top|title=<translate><!--T:11--> Older versions</translate>}}


{{MW 1.26}}
{{MW 1.26}}
<source lang="php">
<syntaxhighlight lang="php">
$wgLogActions = array(
$wgLogActions = array(
'protect/modify' => 'modifiedarticleprotection',
'protect/modify' => 'modifiedarticleprotection',
Line 47: Line 45:
'protect/unprotect' => 'unprotectedarticle',
'protect/unprotect' => 'unprotectedarticle',
);
);
</syntaxhighlight>
</source>


{{MW 1.25}}
{{MW 1.25}}
<source lang="php">
<syntaxhighlight lang="php">
$wgLogActions = array(
$wgLogActions = array(
'protect/protect' => 'protectedarticle',
'protect/protect' => 'protectedarticle',
Line 57: Line 55:
'protect/move_prot' => 'movedarticleprotection',
'protect/move_prot' => 'movedarticleprotection',
);
);
</syntaxhighlight>
</source>


{{MW 1.24}}
{{MW 1.24}}
<source lang="php">
<syntaxhighlight lang="php">
$wgLogActions = array(
$wgLogActions = array(
'block/block' => 'blocklogentry',
'block/block' => 'blocklogentry',
Line 75: Line 73:
'suppress/reblock' => 'reblock-logentry',
'suppress/reblock' => 'reblock-logentry',
);
);
</syntaxhighlight>
</source>


{{MW version|version=1.21|version2=1.23}}
{{MW version|version=1.21|version2=1.23}}
<source lang="php">
<syntaxhighlight lang="php">
$wgLogActions = array(
$wgLogActions = array(
'block/block' => 'blocklogentry',
'block/block' => 'blocklogentry',
Line 96: Line 94:
'suppress/reblock' => 'reblock-logentry',
'suppress/reblock' => 'reblock-logentry',
);
);
</syntaxhighlight>
</source>


{{MW version|version=1.19|version2=1.20}}
{{MW version|version=1.19|version2=1.20}}
<source lang="php">
<syntaxhighlight lang="php">
$wgLogActions = array(
$wgLogActions = array(
'block/block' => 'blocklogentry',
'block/block' => 'blocklogentry',
Line 119: Line 117:
'suppress/reblock' => 'reblock-logentry',
'suppress/reblock' => 'reblock-logentry',
);
);
</syntaxhighlight>
</source>


{{MW version|version=1.7|version2=1.18}}
{{MW version|version=1.7|version2=1.18}}
<source lang="php">
<syntaxhighlight lang="php">
$wgLogActions = array(
$wgLogActions = array(
'block/block' => 'blocklogentry', // 1.7.0
'block/block' => 'blocklogentry', // 1.7.0
Line 153: Line 151:
'patrol/patrol' => 'patrol-log-line', // 1.17.0
'patrol/patrol' => 'patrol-log-line', // 1.17.0
);
);
</syntaxhighlight>
</source>


{{collapse bottom}}
{{collapse bottom}}

Latest revision as of 03:44, 25 January 2024

Logging: $wgLogActions
Lists the message key string for formatting individual events of each type and action when listed in the logs.
Introduced in version:1.7.0 (r14373)
Removed in version:still in use
Allowed values:(array of strings)
Default value:see below

Details

[edit]

Lists the message key string for formatting individual events of each type and action when listed in the logs. Extensions with custom log types may add to this array. Keys are in the same format as $wgLogActionsHandlers .

New log types should be defined using $wgLogActionsHandlers instead, which allows for better localisation of the log messages (see T26620).

See Manual:Logging to Special:Log for more information about logging in MediaWiki.

Default value

[edit]
MediaWiki version:
1.27
/**
 * Lists the message key string for formatting individual events of each
 * type and action when listed in the logs.
 *
 * Extensions with custom log types may add to this array.
 */
$wgLogActions = [];
Older versions
MediaWiki version:
1.26
$wgLogActions = array(
	'protect/modify' => 'modifiedarticleprotection',
	'protect/protect' => 'protectedarticle',
	'protect/unprotect' => 'unprotectedarticle',
);
MediaWiki version:
1.25
$wgLogActions = array(
	'protect/protect' => 'protectedarticle',
	'protect/modify' => 'modifiedarticleprotection',
	'protect/unprotect' => 'unprotectedarticle',
	'protect/move_prot' => 'movedarticleprotection',
);
MediaWiki version:
1.24
$wgLogActions = array(
	'block/block' => 'blocklogentry',
	'block/unblock' => 'unblocklogentry',
	'block/reblock' => 'reblock-logentry',
	'protect/protect' => 'protectedarticle',
	'protect/modify' => 'modifiedarticleprotection',
	'protect/unprotect' => 'unprotectedarticle',
	'protect/move_prot' => 'movedarticleprotection',
	'import/upload' => 'import-logentry-upload',
	'import/interwiki' => 'import-logentry-interwiki',
	'merge/merge' => 'pagemerge-logentry',
	'suppress/block' => 'blocklogentry',
	'suppress/reblock' => 'reblock-logentry',
);
MediaWiki versions:
1.21 – 1.23
$wgLogActions = array(
	'block/block' => 'blocklogentry',
	'block/unblock' => 'unblocklogentry',
	'block/reblock' => 'reblock-logentry',
	'protect/protect' => 'protectedarticle',
	'protect/modify' => 'modifiedarticleprotection',
	'protect/unprotect' => 'unprotectedarticle',
	'protect/move_prot' => 'movedarticleprotection',
	'upload/upload' => 'uploadedimage',
	'upload/overwrite' => 'overwroteimage',
	'upload/revert' => 'uploadedimage',
	'import/upload' => 'import-logentry-upload',
	'import/interwiki' => 'import-logentry-interwiki',
	'merge/merge' => 'pagemerge-logentry',
	'suppress/block' => 'blocklogentry',
	'suppress/reblock' => 'reblock-logentry',
);
MediaWiki versions:
1.19 – 1.20
$wgLogActions = array(
	'block/block'        => 'blocklogentry',
	'block/unblock'      => 'unblocklogentry',
	'block/reblock'      => 'reblock-logentry',
	'protect/protect'    => 'protectedarticle',
	'protect/modify'     => 'modifiedarticleprotection',
	'protect/unprotect'  => 'unprotectedarticle',
	'protect/move_prot'  => 'movedarticleprotection',
	'rights/rights'      => 'rightslogentry',
	'rights/autopromote' => 'rightslogentry-autopromote',
	'upload/upload'      => 'uploadedimage',
	'upload/overwrite'   => 'overwroteimage',
	'upload/revert'      => 'uploadedimage',
	'import/upload'      => 'import-logentry-upload',
	'import/interwiki'   => 'import-logentry-interwiki',
	'merge/merge'        => 'pagemerge-logentry',
	'suppress/block'     => 'blocklogentry',
	'suppress/reblock'   => 'reblock-logentry',
);
MediaWiki versions:
1.7 – 1.18
$wgLogActions = array(
	'block/block'        => 'blocklogentry',              // 1.7.0
	'block/unblock'      => 'unblocklogentry',            // 1.7.0
	'block/reblock'      => 'reblock-logentry',           // 1.18.0
	'protect/protect'    => 'protectedarticle',           // 1.7.0
	'protect/modify'     => 'modifiedarticleprotection',  // 1.11.0
	'protect/unprotect'  => 'unprotectedarticle',         // 1.7.0
	'protect/move_prot'  => 'movedarticleprotection',     // 1.18.0
	'rights/rights'      => 'rightslogentry',             // 1.7.0
	'rights/autopromote' => 'rightslogentry-autopromote', // 1.18.0
	'delete/delete'      => 'deletedarticle',             // 1.7.0
	'delete/restore'     => 'undeletedarticle',           // 1.7.0
	'delete/revision'    => 'revdelete-logentry',         // 1.7.0
	'delete/event'       => 'logdelete-logentry',         // 1.18.0
	'upload/upload'      => 'uploadedimage',              // 1.7.0
	'upload/overwrite'   => 'overwroteimage',             // 1.11.0
	'upload/revert'      => 'uploadedimage',              // 1.7.0
	'move/move'          => '1movedto2',                  // 1.7.0
	'move/move_redir'    => '1movedto2_redir',            // 1.7.0
	'import/upload'      => 'import-logentry-upload',     // 1.7.0
	'import/interwiki'   => 'import-logentry-interwiki',  // 1.7.0
	'merge/merge'        => 'pagemerge-logentry',         // 1.18.0
	'suppress/revision'  => 'revdelete-logentry',         // 1.18.0
	'suppress/file'      => 'revdelete-logentry',         // 1.18.0
	'suppress/event'     => 'logdelete-logentry',         // 1.18.0
	'suppress/delete'    => 'suppressedarticle',          // 1.18.0
	'suppress/block'     => 'blocklogentry',              // 1.18.0
	'suppress/reblock'   => 'reblock-logentry',           // 1.18.0
	'patrol/patrol'      => 'patrol-log-line',            // 1.17.0
);

See also

[edit]