aboutsummaryrefslogtreecommitdiffstats
path: root/includes/logging/DeleteLogFormatter.php
Commit message (Collapse)AuthorAgeFilesLines
* Use namespaced classesUmherirrender2024-10-211-0/+1
| | | | | | | Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: I73fb416573f5af600e529d224b5beb5d2e3d27d3
* Namespace remaining 'specialpage' files under \MediaWiki\SpecialPageJames D. Forrester2023-09-181-0/+1
| | | | | | | SpecialPageFactory is already here, but none of the others were yet. Bug: T166010 Change-Id: I9689bf0a1ab329625e23669b99f019b96295fffd
* Use short array destructuring instead of list()Tim Starling2022-10-211-2/+2
| | | | | | | | Introduced in PHP 7.1. Because it's shorter and looks nice. I used regex replacement. Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
* Allow DeleteLogFormatter to work with pre-T20361 (April 2009) log rowsUmherirrender2021-12-041-1/+1
| | | | | | | | The i18n part of T20361 / ec0dd5b adds new log parameter, logs from before the changes are needed to work with the formatter. Bug: T289806 Change-Id: I096bc14373cbe038671fc33f651af7e005998a3b
* Convert logging namespace to AuthorityPetr Pchelko2021-02-231-5/+2
| | | | Change-Id: Icb44acf275a7f9231c4d229b3886ed8a36d5cbd4
* Add `delete-redirect` for deleting single-rev redirects during movesDannyS7122020-09-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | A new user right, `delete-redirect`, is added (not given to anyone by default). At Special:MovePage, if attempting to move to a single revision redirect that would otherwise be an invalid target (i.e. doesn't point to the source page), the user is able to delete the target. Deletions are logged as `delete/delete_redir2`, and the move is then logged normally as `move/move`, mirroring current delete and move logging. To allow for separate handling by Special:MovePage, MovePage::isValidMove now returns a fatal status `redirectexists` if the target isn't valid but passes Title::isSingleRevRedirect. Otherwise, `articleexists` is returned (as previously). Other callers that don't intend to treat single revision redirects differently should treat `redirectexists` the same as `articleexists`. Currently, this deletion (like normal delete and move) cannot be done through the move api. Since the deletion is only valid when moving a page, unlike for normal deletion, deleting redirects with this right cannot be done via the delete api either. Bug: T239277 Change-Id: I36c8df0a12d326ae07018046541bd00103936144
* phan: Disable enable_class_alias_supportUmherirrender2019-09-151-1/+1
| | | | | | It is enabled for b/c in extensions, but not needed in core Change-Id: I51dca12be9c77049f77563d9bf0edd07928c2300
* Merge "deleteLogFormatter: explicitly declare parsedParametersDeleteLog"jenkins-bot2019-09-131-1/+10
|\
| * deleteLogFormatter: explicitly declare parsedParametersDeleteLogDaimona Eaytoy2019-09-131-1/+10
| | | | | | | | | | | | Instead of having a dynamic property checked via isset(). Change-Id: I64e3a3135b898b65e789aa8307ab9e3ffa0e9f4a
* | Replace usages of deprecated User::isAllowed. Step 2.Petr Pchelko2019-09-111-2/+4
|/ | | | | | Bug: T220191 Depends-On: I509cd88355cfd0cc074f4135ec86399b4075f89f Change-Id: I2341e6f1d108c92924620fba3c64ec090cb09918
* Avoid usage of deprecated Revision::* constants, use RevisionRecordDerick Alangi2019-07-211-4/+6
| | | | Change-Id: I872fc89e5c02dd6a3ae9cd7e76640b95dc33f514
* DeleteLogFormatter: Handle missing ofield/nfieldBrad Jorsch2019-06-121-7/+14
| | | | | | | | ofield and nfield may be missing from old log entries. Take that into account when processing. Bug: T224815 Change-Id: I06dda3106bab9980f6fa7d515542e94a91c17f64
* Fix MediaWiki.Commenting.LicenseComment.InvalidLicenseTag errorsKunal Mehta2018-05-231-1/+1
| | | | Change-Id: I936c3f5fca1a0061f215e80469f5d882cb32ee29
* Use LogFormatter::getLinkRenderer in LogFormatter extensionsMatěj Suchánek2017-07-121-3/+1
| | | | | | | | And additionally, migrate another two usages of deprecated Linker methods. Bug: T149346 Change-Id: I222da144a37f7d77eaf4bdde901b58c992f1af85
* Move count of revisions/files out of undelete log commentumherirrender2017-04-081-0/+24
| | | | | | | | | | | | 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
* Replace Linker::link() usage with LinkRendererHaikal Izzuddin2016-12-011-10/+13
| | | | | Bug: T149346 Change-Id: Ie384566617f18ad6c3bf836b39702365d59f714d
* Introduce separate log action for deleting pages on moveMGChecker2016-11-131-0/+1
| | | | | | | | | | 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
* revisiondelete: Fix $oldBits/$newBits usage in setVisibility()Aaron Schulz2016-06-031-0/+1
| | | | | | This addresses the FIXME comment around updateLog() Change-Id: Iedb9df0b4cf65308a6b58bd9d9295d1850bc2c28
* logging: Simplify DeleteLogFormatter b/c checkAaron Schulz2016-06-031-5/+7
| | | | Change-Id: Iab16663579d2eece4a94f80f7120b231aed0e572
* Add used messages to LogFormatter::getMessageKey overridesumherirrender2016-02-221-0/+2
| | | | Change-Id: I55e943ab2788e7fee022d40cc3d74ed479788f3b
* Convert all array() syntax to []Kunal Mehta2016-02-171-28/+28
| | | | | | | | | | 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
* API: Move parameter formatting into LogFormatterBrad Jorsch2015-04-171-0/+63
| | | | | | | | | | | | | | 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
* Fix link to Special:RevisionDelete in newer log revdel logsAlex Monk2015-04-141-0/+3
| | | | | | Bug: T96049 Change-Id: I6817ac13e776a3e6fa766c3996173b5da02f54de Follows-up: Ic149960f797d05fd088fa014390d791e3ae08687
* Use new log system when create log entry for revision deleteumherirrender2015-02-071-4/+8
| | | | | | | | | | | | 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
* Add 'messages used' commentumherirrender2014-04-131-0/+2
| | | | Change-Id: I69acea2a1f0a1ef6854d2ebddda446f86086633e
* Format archive and filearchive revision delete log entriesumherirrender2014-04-131-3/+4
| | | | | | | | 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
* No variable assignment on return statementumherirrender2014-01-021-3/+6
| | | | | | | | | | 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
* Break long lines in logging related classesSiebrand Mazeland2013-12-031-6/+11
| | | | | | | | Also: * Take function call out of for loop test part. * Suppress CodeSniffer warnings for unavoidable long lines. Change-Id: I14044f14b30d494d910541a1dac50921254a7398
* Update formatting for log related classesSiebrand Mazeland2013-12-031-87/+92
| | | | Change-Id: I6535467ed9b22d61b7c5caf3f18067a988871751
* No spaces after (casts)MatmaRex2013-09-041-2/+2
| | | | | | | | | | 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
* Change @since and @deprecated notes to 1.22Kevin Israel2013-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fixed spacing in logging/parser/profiler/rl/revdel/search folderumherirrender2013-04-201-3/+3
| | | | | | | Added spaces before if, foreach Added some braces for one line statements Change-Id: I11bbcfa351e945b7bde10c2105d61a3cf5622205
* Added/Removed spaces around string concatenationumherirrender2013-04-131-2/+2
| | | | | | | | | And added/removed spaces around some other tokens, like +, -, *, /, <, >, =, ! Fixed windows newline style Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
* Move subclasses of LogFormatter to their own fileAlexandre Emsenhuber2013-03-151-0/+196
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