aboutsummaryrefslogtreecommitdiffstats
path: root/includes/logging
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow marking recent changes about logged actions with bot flagMatěj Suchánek2023-03-131-1/+15
| | | | | | | | | There was no clean way to do this but using the global state. The parameter is three-state to keep backward compatibility. Bug: T304428 Change-Id: I01c5f8e9646cbe861516100c3b8d165aefb95ca0
* Copy the Renameuser extension into coreTim Starling2023-03-031-0/+116
| | | | | | | | | Copy the Renameuser extension into core, with minimal code changes. The hook handlers are inlined into Article, SpecialLog and SpecialContributions. Bug: T27482 Change-Id: I314021f4138773df6aaf2753b33ab8283cd16974
* Reorg: Namespace the Title classJames D. Forrester2023-03-0214-1/+17
| | | | | | | | | | | | | | | | | | | This is moderately messy. Process was principally: * xargs rg --files-with-matches '^use Title;' | grep 'php$' | \ xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1' * rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \ xargs rg --files-with-matches 'Title\b' | \ xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1' * composer fix Then manual fix-ups for a few files that don't have any use statements. Bug: T166010 Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
* Reorg: Migrate WikiMap to WikiMap/ out of includesAmir Sarabadani2023-02-271-0/+1
| | | | | | | And WikiReference Bug: T321882 Change-Id: I60cf4b9ef02b9d58118caa39172677ddfe03d787
* Reorg: Move HTML-related classes out of includes/ to Html/Amir Sarabadani2023-02-162-0/+2
| | | | | Bug: T321882 Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
* Reorg: Move EditPage.php to MediaWiki\EditPageAmir Sarabadani2023-02-151-1/+4
| | | | | | | | Also moving TemplatesOnThisPageFormatter to the same namesapce as it's only used by EditPage Bug: T321882 Change-Id: Ibefc44eb64aedb430148b109090584c3e35794ab
* Remove obsolete Rdbms query groups from getConnection callsTimo Tijhof2023-02-151-5/+2
| | | | | | | | | | | | | | | The currently supported groups are documented in database.md. While at it, prefer the string form of the $groups parameter where possible, since the complexity of an array is never utilized, as the groups either can't overlap, or are decided on by the caller instead. This also helps with the simpler LBFactory::getConnection() proposed in T326274. Bug: T263127 Bug: T326274 Change-Id: I7a31a07a8c3f1e265ac43ab59f23326590b407c3
* Minor PHPDoc fixups and improvements in different placesthiemowmde2023-02-141-1/+1
| | | | | | | | A series of minor documentation fixes I collected in my local dev environment over the past months. I'm not sure if it's worth splitting this further. Change-Id: I1ef383b40271f1513cb03d0de1fe511f4ca51ada
* logging: Add class for suppressed items on Special:LogUmherirrender2023-01-201-5/+5
| | | | | | | | Similiar to the handling for suppressed edits since b6f148b Bug: T327538 Follow-Up: I08f14f712479e1b170c606e2b64857f8386acd76 Change-Id: Icfb46d9ef02984510ef1c2c5e4785345cbe6ad2f
* rdbms: Remove setBigSelects() without deprecationAaron Schulz2023-01-061-7/+0
| | | | | Bug: T325610 Change-Id: I43a5bde7ae54af7ab0c817df5eab8234a2c41564
* Use CommentStore service instead of deprecated methodDerick Alangi2023-01-043-9/+7
| | | | | | | | Also, added a parameters to XmlDumpWriter so that they could be inject via WikiExporter. Bug: T325475 Change-Id: I84b82506509e2c09dad0691af2df958a5af5b5b0
* Merge "Message::rawParam: Add novel 'exec_html' annotation"jenkins-bot2023-01-043-0/+4
|\
| * Message::rawParam: Add novel 'exec_html' annotationSBassett2022-12-163-0/+4
| | | | | | | | | | Bug: T323104 Change-Id: Id3bfe52b8b55ac304b6b85e14951c3dbd16aa7d9
* | Split a base class out of CommentStoreAlexander Vorwerk2023-01-013-0/+3
| | | | | | | | | | | | | | | | | | | | so that extensions (i.e. CheckUser) can implement their own comment store without having a lot of code duplication basically the comment store version of I3a6486532f2ef36 Bug: T233004 Change-Id: Ib40f99e00a514d41776ce521baf113e46d37e9cd
* | Make use of ??= in more placesDannyS7122022-12-172-6/+2
| | | | | | | | | | | | New feature from PHP 7.4 Change-Id: Ifa7a9bc7b2ec415ad7ecb23f4c1776f51f58fd6b
* | Merge "Make use of ?:, ?? and ??= operators in mostly trivial cases"jenkins-bot2022-12-162-9/+2
|\ \ | |/ |/|
| * Make use of ?:, ?? and ??= operators in mostly trivial casesthiemowmde2022-12-052-9/+2
| | | | | | | | | | | | | | | | | | | | The motivation is to make the code less confusing. I hope this is the case. ?? is an older PHP 7.0 feature. ??= was added in PHP 7.4, which we can finally use. Change-Id: Id807affa52bd1151a74c064623b41d950a389560
* | Merge "Replace deprecated Linker::commentBlock/revComment"jenkins-bot2022-12-141-1/+2
|\ \
| * | Replace deprecated Linker::commentBlock/revCommentUmherirrender2022-12-111-1/+2
| | | | | | | | | | | | | | | Bug: T324906 Change-Id: I8cf96c3b7a03127ce1243f7a7e849b6d5a5d3dfa
* | | Special:Log: Let the tag filter be inverteddvrandecic2022-12-132-4/+23
|/ / | | | | | | | | | | | | | | Adding a checkbox that is passed through to the backend that allows to filter entries out based on a tag. Bug: T174349 Change-Id: I42c4671def335401da93789f304eb093c07c8190
* | Reorg: Move DummyLinker and Linker to linker/Amir Sarabadani2022-12-083-0/+3
| | | | | | | | | | | | | | This feels like a no-brainer unless I'm missing something obvious Bug: T321882 Change-Id: Id49c3d0dd6ea4593211048850856b5b8e05a8fb3
* | LogEventsList: Move the 'pattern' field before the 'extra' fieldFunc2022-12-061-5/+5
|/ | | | | | | The 'pattern' field is related to the page field, and should be put right after it. Change-Id: Ifc3837f244d2a159bbf2bb85fe237155ef449579
* Merge "Prefill page/pattern/tagfilter/offender in form for Special:Log"jenkins-bot2022-11-231-4/+14
|\
| * Prefill page/pattern/tagfilter/offender in form for Special:LogUmherirrender2022-10-311-4/+14
| | | | | | | | | | Bug: T321988 Change-Id: I09284cf5337e7fc548667a2e5b890c2a70cb8095
* | Various doc fixes about false on method arguments/return typesUmherirrender2022-11-101-1/+1
| | | | | | | | | | | | Doc-only changes Change-Id: I5177f582ae7ee70c357e9389fed14819faf79463
* | Better document the type of timestamp accepted/returnedthiemowmde2022-11-022-3/+3
|/ | | | | | Related to I29399e7. Change-Id: Iafa1fcac95f9b7a6cbc3a8ae9d4aff825acb302d
* Revert "Reorg: Move some of request related classes to MediaWiki/Request"Zabe2022-10-272-4/+4
| | | | | | | | | This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922. Reason for revert: T166010#8349431 Bug: T166010 Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
* Reorg: Move some of request related classes to MediaWiki/RequestAmir Sarabadani2022-10-262-4/+4
| | | | | | | | | | | | | Moving: - DerivativeRequest - FauxRequest - FauxRequestUpload - PathRouter - WebRequest - WebRequestUpload Bug: T166010 Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
* Merge "Sort logging table by timestamp and log id"jenkins-bot2022-10-261-1/+1
|\
| * Sort logging table by timestamp and log idUmherirrender2022-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | Sorting on log_id must not give a result in time order, because maintenance scripts can insert newer ids with older timestamps. When only sorting for log_timestamp the result is not stable, because for items with same timestamp the order is not defined. For Special:Log the same timestamp gives problems on pagination Bug: T305590 Change-Id: Ic0c2ebd19ee6a8aa570c5a12a92b31008135491c
* | Reorg: Move StubObject classes in includes to its own directoryAmir Sarabadani2022-10-251-0/+1
| | | | | | | | | | Bug: T166010 Change-Id: Idcf0e9dc6e0841e4f132207bce0f96774dad898c
* | Use short array destructuring instead of list()Tim Starling2022-10-214-5/+5
| | | | | | | | | | | | | | | | Introduced in PHP 7.1. Because it's shorter and looks nice. I used regex replacement. Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
* | Call setFormIdentifier() on LogEventsList formBrian Wolff2022-10-191-1/+3
|/ | | | | | | | | | | HTMLMultiSelectField requires this for forms submitted by GET that have checkboxes that default true. Previously on special:log it was impossible to deselect all options under "show additional logs". Bug: T321154 Change-Id: Iacc7beb4363eb756675ff71e6efed706f88fd45b
* build: Update mediawiki/mediawiki-phan-config to 0.12.0Daimona Eaytoy2022-10-081-0/+1
| | | | | | | | This patch only adds and removes suppressions, which must be done in the same patch as the version bump. Bug: T298571 Change-Id: I4044d4d9ce82b3dae7ba0af85bf04f22cb1dd347
* Fixes for the phan upgrade, part 1Daimona Eaytoy2022-10-081-3/+6
| | | | | | | | | | | | | Mainly, document some parameters as non-empty-array so that phan knows the list of arguments won't be empty when unpacking. In EditPage, account for hooks potentially unsetting the copyright notice. Also rewrite some code in LogPager, so it's hopefully easier for phan to understand what's going on. Change-Id: Ic0638571554424098d0743db32dd46723a08e103
* pager: Clean up file headers and `@ingroup`Timo Tijhof2022-09-291-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Follows similar commits to the objectcache, rdbms, filerepo, jobqueue components and other areas [1]. * Remove duplicate descriptions from file blocks in favour of class doc blocks. This reduces needless duplication and was often incorrect or outdated, and helps (ironically) to make the file header more consistently visually ignorable. * Remove `ingroup` from file blocks in class files as otherwise the file is indexed twice (e.g. in Doxygen) which makes navigation more messy. * Fix non-standard `@unstable for implementation` annotations in favour of `@stable to type` as per T257789 and <https://www.mediawiki.org/wiki/Stable_interface_policy>. While at it, fix the only other outstanding uses of `@stable for` in core as well in a handful of context/, logging/ and search/ files. [1] https://gerrit.wikimedia.org/r/q/message:ingroup+owner:Krinkle Bug: T257789 Change-Id: Ided3c5ab69e1b587b1b76a3c97a7cdb88f21e130
* Remove unused key variable from foreach loopsUmherirrender2022-09-211-1/+1
| | | | Change-Id: Id2d91e30a6f7cc4eb93427b50efc1c5c77f14b75
* ManualLogEntry: Don't pass null to trim() as PHP 8.1 whinesJames D. Forrester2022-09-091-1/+1
| | | | Change-Id: I14c6c22d822ae43c57e8163d292bea299a58fbb4
* Merge "Show namespace instead of SpecialAllPages in plaintext block log message"jenkins-bot2022-07-281-3/+12
|\
| * Show namespace instead of SpecialAllPages in plaintext block log messagedreamyjazz2022-07-281-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that when constructing a plaintext block log message for a partial block that the namespace is shown. Currently because makePageLink in plaintext mode uses the page title and does not include the $html text, which is used in non- plaintext mode, it means that for namespace blocks the shown text is "Special:AllPages". There is no way to link to Special:AllPages with a specified namespace while in plaintext mode because the namespace query parameter cannot be included in the wikilink. This means that, if the page was still linked to, the link would just show all pages. As such, unless other patches are submitted to allow the namespace to be specified when linking through a wikilink, the link is best removed. The plaintext value of the namespace is used by the CheckUser extension, which is what the relevant bug reports issues with. Bug: T268156 Change-Id: Ic05ae1adf92cb806517226d74bf2edc9a89251cd
* | LogFormatter: Cast argument of ctype_digit to string [php8.1]Brian Wolff2022-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Passing ints here is deprecated in php 8.1. Additionally, it is almost certainly not what we want, since an int to this function is interpreted as an ascii code point (e.g. ctype_digit( 1 ) is false. It is true for ints between 48-57 and > 255). In practise this doesn't change much, since there is also an is_int check here. Bug: T313663 Change-Id: I11f3c710ba667d0f01574856af8f3da11d0b7f15
* | ManualLogEntry::getComment() should always return stringMark A. Hershberger2022-07-091-1/+1
| | | | | | | | | | | | | | | | | | So, typehint setComment and then fix tests so they always pass a summary. This also introduces an api change. Bug: T311567 Change-Id: I478e62b6753d6009017ab0acc295e6cee7d3b017
* | Hard deprecate ManualLogEntry::setTagsMatěj Suchánek2022-07-081-1/+3
| | | | | | | | | | | | | | It has been deprecated since 1.33 and it is unused in Wikimedia code. Change-Id: I010614d600b1ec334b92cc1a8897a10756504a69
* | Call IContextSource::getAuthority instead of IContextSource::getUserUmherirrender2022-06-293-11/+9
| | | | | | | | | | | | | | Change to use Authority object where possible to use the interface instead of implementation Change-Id: Ia7e9ce2a2f05ef2ae1cf981bf96faf48b04cf58d
* | Remove LogFormatter::styleRestricedElementMatěj Suchánek2022-06-161-11/+0
|/ | | | | | It's been deprecated since 1.37 and it is unused. Change-Id: Ibc7d722601b70c4a599d9b235b5d5a2fe1b5328a
* logging: Add index hint when asking for a specific userAmir Sarabadani2022-05-241-0/+10
| | | | | | | | | | | | It seems optimizer can't pick the right index when the user has done many log actions. See the ticket for more information. There are two indexes for actor and they are not that different so even the wrong pick is fine but to make it more performant, make sure you get log_actor_type_time when you filter based on both actor and type. Bug: T303089 Change-Id: Ie0e7b5cc3a245dc28157a0276f6cce62f90b797f
* Fix many typos in commentsMatěj Suchánek2022-05-101-1/+1
| | | | | | Found using IntelliJ's "Typo" code inspection. Change-Id: I746220ebe6e1e39f6cb503390ec9053e6518cf16
* Merge "logging: Use MainConfigNames constants"jenkins-bot2022-04-266-23/+31
|\
| * logging: Use MainConfigNames constantsUmherirrender2022-04-226-23/+31
| | | | | | | | | | | | Also use config from context, if available Change-Id: I35d3254b1859116be53fd53c05cbdef81ca01b22
* | Replace usage of UserGroupMembership::getGroupMemberName/getGroupNameUmherirrender2022-04-221-2/+3
|/ | | | | | | UserGroupMembership::getGroupName is deprecated and getGroupMemberName looks similar Change-Id: Ic8b7ec54b18093533c302a6a319137e597d09d87