Commit graph

22 commits

Author SHA1 Message Date
Kunal Mehta
e0193327bd Fix MediaWiki.Commenting.LicenseComment.InvalidLicenseTag errors
Change-Id: I936c3f5fca1a0061f215e80469f5d882cb32ee29
2018-05-23 16:23:42 -07:00
Matěj Suchánek
d0fa4e8d15 Use LogFormatter::getLinkRenderer in LogFormatter extensions
And additionally, migrate another two usages of deprecated
Linker methods.

Bug: T149346
Change-Id: I222da144a37f7d77eaf4bdde901b58c992f1af85
2017-07-12 09:58:18 +02:00
umherirrender
6971569512 Move count of revisions/files out of undelete log comment
The log comment on undelete contains a hint about the count of restored
files and/or revisions.
Move this text out of the comment to allow longer comments. Also makes
this information readable inside the api.

This is only for new log entries. Old entries will still show the hint
from the comment and no data in the api.

Change-Id: I9e30eb1271656bb81259a408210e9a282e949c57
2017-04-08 05:46:45 +00:00
Haikal Izzuddin
2c657ec256 Replace Linker::link() usage with LinkRenderer
Bug: T149346
Change-Id: Ie384566617f18ad6c3bf836b39702365d59f714d
2016-12-01 12:04:38 -08:00
MGChecker
2ee4c67286 Introduce separate log action for deleting pages on move
Since T106119, moves that overwrite a redirect produce a deletion log
entry. It should be possibleto identify such deletions within other ones.
Note that this patch only applies for actions in the future because there
is no way to easily identify these cases for the software (until now).

Bug: T145991
Change-Id: I3c006bca57351d82031c4fdce0c53f65d630b0d9
2016-11-13 01:27:04 +01:00
Aaron Schulz
f8f60f3926 revisiondelete: Fix $oldBits/$newBits usage in setVisibility()
This addresses the FIXME comment around updateLog()

Change-Id: Iedb9df0b4cf65308a6b58bd9d9295d1850bc2c28
2016-06-03 23:04:27 +00:00
Aaron Schulz
057abe72a5 logging: Simplify DeleteLogFormatter b/c check
Change-Id: Iab16663579d2eece4a94f80f7120b231aed0e572
2016-06-03 22:09:37 +00:00
umherirrender
f51f5614a3 Add used messages to LogFormatter::getMessageKey overrides
Change-Id: I55e943ab2788e7fee022d40cc3d74ed479788f3b
2016-02-22 19:11:18 +01:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Brad Jorsch
61233fc847 API: Move parameter formatting into LogFormatter
This allows for extensions to format their log entry parameters, and
keeps the code for formatting API log entry parameters in the same place
as for other formatting.

This also takes the opportunity to rearrange the output format slightly
to avoid conflicts like what's happening in T73020.

Bug: T35235
Bug: T73020
Bug: T91466
Change-Id: I6846ce09322eb404c506b5a51780a44ce9279fe2
2015-04-17 04:59:41 +00:00
Alex Monk
a577708080 Fix link to Special:RevisionDelete in newer log revdel logs
Bug: T96049
Change-Id: I6817ac13e776a3e6fa766c3996173b5da02f54de
Follows-up: Ic149960f797d05fd088fa014390d791e3ae08687
2015-04-14 20:51:07 +01:00
umherirrender
8089580c62 Use new log system when create log entry for revision delete
The actions delete/event and delete/revision was not using the new
LogEntry to create the log row, changed this.

All params gets a number to avoid too many changes in DeleteLogFormatter
to keep the old and new format working.

Needs extra code for api to keep the output format unchanged.

Change-Id: Ic149960f797d05fd088fa014390d791e3ae08687
2015-02-07 20:05:13 +00:00
umherirrender
30305e7ce8 Add 'messages used' comment
Change-Id: I69acea2a1f0a1ef6854d2ebddda446f86086633e
2014-04-13 15:47:07 +00:00
umherirrender
4ae5fb99b0 Format archive and filearchive revision delete log entries
DeleteLogFormatter only checks for revision and oldimage, but it is also
possible to delete archived revisions or archived files, so also check
for these types to have better formatted log entries.

Change-Id: I3f8eaa3956e2c7fc216fb4030fe4bab6cb8bbd60
2014-04-13 15:31:14 +00:00
umherirrender
073abe3e12 No variable assignment on return statement
Split the variable assignment and the return statement in two lines for
better readability.

When there was two return statements in one method the logic was swapped
to have only one return statement.

Change-Id: Id7a01b4a2df96036435f9e1a9be5678dd124b0af
2014-01-02 09:43:35 +00:00
Siebrand Mazeland
86fe1da236 Break long lines in logging related classes
Also:
* Take function call out of for loop test part.
* Suppress CodeSniffer warnings for unavoidable long lines.

Change-Id: I14044f14b30d494d910541a1dac50921254a7398
2013-12-03 15:58:51 +01:00
Siebrand Mazeland
8a536b8591 Update formatting for log related classes
Change-Id: I6535467ed9b22d61b7c5caf3f18067a988871751
2013-12-03 15:36:21 +01:00
MatmaRex
df8ec1e216 No spaces after (casts)
Also removed some unnecessary ones. I think I've caught them all.

The spaceless version already appears in core ~300 times (after
accounting for false positives when grepping). Some consistency would
be nice.

Change-Id: I607655b5f4366e66dc78730d5fd2f57ed8776cae
2013-09-04 20:05:43 +02:00
Kevin Israel
876bddf637 Change @since and @deprecated notes to 1.22
Using the following command line, I have found doc comments mentioning
"1.21" when they should mention "1.22" instead, which I have fixed
manually:

git diff REL1_21 | grep --color=always -C 10 -iE \
'^\+.*(since|deprecated).*1\.21(\D|$)' | aha > oldver.html

I also moved the release notes for I1987190f ("Combine JavaScript and
JSON encoding logic") from RELEASE-NOTES-1.21 to RELEASE-NOTES-1.22
because I had reverted the commit on REL1_21 only (see Id3b88102 and
bug 47431 for the rationale).

Change-Id: I11b917a371e07267dfa98b8449776d0c1cb29b15
Follows-Up: I25cf5a94f6e47f85a9d0b80cc1c9c9f957288478
Follows-Up: I3d72e4105f6244b0695116940e62a2ddef66eb66
Follows-Up: I3faa9c3e8107c6e46cdf21f8c18adda1f42890d7
Follows-Up: I6aab19c8d68bf47beddad42632b0360a7b12f251
Follows-Up: I86368821fc2cd0729df5342b8572eb470c0f77a0
Follows-Up: Id3b88102e768318e3605a19e9952121091a40915
Follows-Up: Ie667088010e24eb6cb569f9e8e8e2553005223eb
2013-06-21 05:33:22 +00:00
umherirrender
6c38a5eb72 Fixed spacing in logging/parser/profiler/rl/revdel/search folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I11bbcfa351e945b7bde10c2105d61a3cf5622205
2013-04-20 17:38:24 +02:00
umherirrender
15abcf71ca Added/Removed spaces around string concatenation
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !

Fixed windows newline style

Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
2013-04-13 13:36:24 +02:00
Alexandre Emsenhuber
744c0c7541 Move subclasses of LogFormatter to their own file
Except LegacyLogFormatter.

includes/logging/LogFormatter.php is getting bigger and bigger with
the addition of new formatters when logs are changed to use them
instead of the old method, so better doing this now before we get
new formatters for remaining log types.

Change-Id: I6aab19c8d68bf47beddad42632b0360a7b12f251
2013-03-15 15:25:33 +01:00