Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -3506,6 +3506,12 @@ |
3507 | 3507 | 'unwatch' => array( |
3508 | 3508 | 'confirm-unwatch-button', |
3509 | 3509 | ), |
| 3510 | + 'logging' => array( |
| 3511 | + 'logentry-move-move', |
| 3512 | + 'logentry-move-move-noredirect', |
| 3513 | + 'logentry-move-move_redir', |
| 3514 | + 'logentry-move-move_redir-noredirect', |
| 3515 | + ), |
3510 | 3516 | ); |
3511 | 3517 | |
3512 | 3518 | /** Comments for each block */ |
— | — | @@ -3737,4 +3743,5 @@ |
3738 | 3744 | 'db-error-messages' => 'Database error messages', |
3739 | 3745 | 'html-forms' => 'HTML forms', |
3740 | 3746 | 'sqlite' => 'SQLite database support', |
| 3747 | + 'logging' => 'New logging system', |
3741 | 3748 | ); |
Index: trunk/phase3/includes/logging/LogFormatter.php |
— | — | @@ -56,9 +56,7 @@ |
57 | 57 | |
58 | 58 | // Nonstatic-> |
59 | 59 | |
60 | | - /** |
61 | | - * @var LogEntry |
62 | | - */ |
| 60 | + /// @var LogEntry |
63 | 61 | protected $entry; |
64 | 62 | |
65 | 63 | /// Whether to output user tool links |
— | — | @@ -323,7 +321,7 @@ |
324 | 322 | * This class formats Block log entries. |
325 | 323 | * @since 1.19 |
326 | 324 | */ |
327 | | -class BlockLogFormatter extends LogFormatter { |
| 325 | +class MoveLogFormatter extends LogFormatter { |
328 | 326 | protected function getMessageKey() { |
329 | 327 | $key = parent::getMessageKey(); |
330 | 328 | $params = $this->getMessageParameters(); |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -4909,7 +4909,8 @@ |
4910 | 4910 | * an action, which is a specific kind of event that can exist in that |
4911 | 4911 | * log type. |
4912 | 4912 | */ |
4913 | | -$wgLogTypes = array( '', |
| 4913 | +$wgLogTypes = array( |
| 4914 | + '', |
4914 | 4915 | 'block', |
4915 | 4916 | 'protect', |
4916 | 4917 | 'rights', |
— | — | @@ -4962,6 +4963,9 @@ |
4963 | 4964 | * will be listed in the user interface. |
4964 | 4965 | * |
4965 | 4966 | * Extensions with custom log types may add to this array. |
| 4967 | + * |
| 4968 | + * Since 1.19, if you follow the naming convention log-name-TYPE, |
| 4969 | + * where TYPE is your log type, yoy don't need to use this array. |
4966 | 4970 | */ |
4967 | 4971 | $wgLogNames = array( |
4968 | 4972 | '' => 'all-logs-page', |
— | — | @@ -4982,6 +4986,9 @@ |
4983 | 4987 | * top of each log type. |
4984 | 4988 | * |
4985 | 4989 | * Extensions with custom log types may add to this array. |
| 4990 | + * |
| 4991 | + * Since 1.19, if you follow the naming convention log-description-TYPE, |
| 4992 | + * where TYPE is your log type, yoy don't need to use this array. |
4986 | 4993 | */ |
4987 | 4994 | $wgLogHeaders = array( |
4988 | 4995 | '' => 'alllogstext', |
— | — | @@ -5020,8 +5027,6 @@ |
5021 | 5028 | 'upload/upload' => 'uploadedimage', |
5022 | 5029 | 'upload/overwrite' => 'overwroteimage', |
5023 | 5030 | 'upload/revert' => 'uploadedimage', |
5024 | | - 'move/move' => '1movedto2', |
5025 | | - 'move/move_redir' => '1movedto2_redir', |
5026 | 5031 | 'import/upload' => 'import-logentry-upload', |
5027 | 5032 | 'import/interwiki' => 'import-logentry-interwiki', |
5028 | 5033 | 'merge/merge' => 'pagemerge-logentry', |
— | — | @@ -5038,8 +5043,12 @@ |
5039 | 5044 | * The same as above, but here values are names of functions, |
5040 | 5045 | * not messages. |
5041 | 5046 | * @see LogPage::actionText |
| 5047 | + * @see LogFormatter |
5042 | 5048 | */ |
5043 | | -$wgLogActionsHandlers = array(); |
| 5049 | +$wgLogActionsHandlers = array( |
| 5050 | + // move, move_redir |
| 5051 | + 'move/*' => 'MoveLogFormatter', |
| 5052 | +); |
5044 | 5053 | |
5045 | 5054 | /** |
5046 | 5055 | * Maintain a log of newusers at Log/newusers? |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -539,7 +539,7 @@ |
540 | 540 | 'ManualLogEntry' => 'includes/logging/LogEntry.php', |
541 | 541 | 'LogFormatter' => 'includes/logging/LogFormatter.php', |
542 | 542 | 'LegacyLogFormatter' => 'includes/logging/LogFormatter.php', |
543 | | - 'BlockLogFormatter' => 'includes/logging/LogFormatter.php', |
| 543 | + 'MoveLogFormatter' => 'includes/logging/LogFormatter.php', |
544 | 544 | |
545 | 545 | # includes/media |
546 | 546 | 'BitmapHandler' => 'includes/media/Bitmap.php', |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -4638,4 +4638,10 @@ |
4639 | 4639 | 'sqlite-has-fts' => '$1 with full-text search support', |
4640 | 4640 | 'sqlite-no-fts' => '$1 without full-text search support', |
4641 | 4641 | |
| 4642 | +# New logging system |
| 4643 | +'logentry-move-move' => '$1 {{GENDER:$2|moved}} page $3 to $4', |
| 4644 | +'logentry-move-move-noredirect' => '$1 {{GENDER:$2|moved}} page $3 to $4 without leaving a redirect', |
| 4645 | +'logentry-move-move_redir' => '$1 {{GENDER:$2|moved}} page $3 to $4 over redirect', |
| 4646 | +'logentry-move-move_redir-noredirect' => '$1 {{GENDER:$2|moved}} page $3 to $4 over a redirect without leaving a redirect', |
| 4647 | + |
4642 | 4648 | ); |