aboutsummaryrefslogtreecommitdiffstats
path: root/includes/changes
Commit message (Collapse)AuthorAgeFilesLines
* Remove remaining non-test uses of Revision objectsDannyS7122021-05-041-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following methods no longer support Revision parameters: - CategoryMembershipChange::__construct - ContentHandler::getUndoContent - DerivedPageDataUpdater::prepareUpdate - DifferenceEngine::getRevisionHeader The following methods were removed entirely: - Title::countAuthorsBetween The following methods return arrays that formerly include a 'revision' key that would emit deprecation warnings when accessed and return a Revision object. The Revision object has been removed from the arrays, and the 'revision-record' key should be used to get the relevant RevisionRecord instead: - PageUpdater::doModify - PageUpdater::doCreate - Parser::statelessFetchTemplate The ParserOptions `templateCallback` option is a callback that is called in Parser::fetchTemplateAndTitle() and should return an array - the 'revision' key to that array used to be a Revision object and was used if no 'revision-record' was returned - it is now ignored. Bug: T247143 Change-Id: I163ada88d649c75697aff4fa31a3a3c0bdef78b7
* Replace uses of DB_MASTER with DB_PRIMARYJames D. Forrester2021-04-291-4/+4
| | | | | | Just an auto-replace from codesniffer for now. Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
* Merge "Add classes to when a linked change is suppressed"jenkins-bot2021-04-291-4/+17
|\
| * Add classes to when a linked change is suppressedAmir Sarabadani2021-04-291-4/+17
| | | | | | | | | | | | | | | | | | | | This also tries to centralize adding logic of adding history-deleted class as well. To make future changes easier. This doesn't affect history deletion on files, recentchanges, and logs yet Bug: T23272 Change-Id: I08f14f712479e1b170c606e2b64857f8386acd76
* | Stop using legacy ActorMigration field "rc_user"Tim Starling2021-04-281-4/+16
| | | | | | | | | | Bug: T278917 Change-Id: I4d6c175c637a2cb26c63e0b2b27d5ea8ce6b1e0d
* | Merge "RecentChange: replace Title in method signatures"jenkins-bot2021-04-261-40/+124
|\ \ | |/ |/|
| * RecentChange: replace Title in method signaturesdaniel2021-04-261-40/+124
| | | | | | | | | | Bug: T278459 Change-Id: I144ea130f29ec437302649d86494034af044c524
* | Remove ArticleEditUpdatesDeleteFromRecentchanges hook, deprecated in 1.35James D. Forrester2021-04-211-1/+7
|/ | | | | | | | Also move RC purging code. Bug: T244613 Depends-On: I743b764ccd031df448cfac31a9bba3c60442d250 Change-Id: Ib455501c266f8482f56d08041de0f5beba651a0b
* Remove $actor field from UsererIdentityValuedaniel2021-04-131-2/+1
| | | | | | | | | | | | | | | | | Code that needs to store an actor ID in the database to represent a UserIdentity, or needs to construct a UserIdentity based on an actor ID loaded from the database, should use the ActorNormalization service. Note: The getActorId() method is removed from the UserIdentity interface, but all concrete classes continue to support it for now. UsererIdentityValue::getActorId() is hard deprecated and should be removed in 1.37. It always returns 0. User::getActorId() is not deprecated at this point. Bug: T274179 Depends-On: Id2b3ddf6a2a7cdf90f8936a69148d2cce6fde237 Change-Id: I9925906d11e47efaec3c1f48d5cb3f9896a982c1
* build: Swap deprecated @codingStandardsIgnore to phpcs:ignoreUmherirrender2021-04-041-2/+1
| | | | | Bug: T278594 Change-Id: I09a6175917090593e6e0055203a890c32bea03a5
* Fix missing styles on diffmainframe982021-04-021-0/+2
| | | | | | | | | | The markers for minor, bot, unpatrolled and new page edits used to be bolded, but weren't after I3f45c95d2856c8fce2da5175b52089d4e629a41e. Move the relevant styles to mediawiki.interface.helpers.styles, which is used on all places where these markers can be found. Bug: T279099 Change-Id: I7af935da13669b6519ba770b413cb1ef027cac1c
* RecentChange: directly build the user identity if we have the dataPetr Pchelko2021-03-251-0/+5
| | | | | Bug: T277795 Change-Id: I87560b2fa68efde479dc97ce568f9e74533096d9
* Convert CategoryMembershipChange to AuthorityPetr Pchelko2021-03-242-15/+13
| | | | Change-Id: Icbc1c7f7f248dfbc8a391f91d9b3608fdf2224a1
* Replace various usages of PermissionManager with AuthorityPetr Pchelko2021-03-172-5/+1
| | | | Change-Id: Idc303bdbbe2b7ce9e7011ee1f3926c781c56af71
* Merge "Deprecate UserIdentity::getActorId()"jenkins-bot2021-03-131-7/+1
|\
| * Deprecate UserIdentity::getActorId()daniel2021-03-131-7/+1
| | | | | | | | | | | | | | Note: User::getActorId() is not (yet) deprecated. Bug: T274179 Change-Id: Ic2ca6d489db821fc2334e53bf2496c7b0d3ea5b1
* | Add @since to RecentChange::getPerformerIdentity()Reedy2021-03-131-0/+2
|/ | | | | Change-Id: I96c3699d8f9d3eddc5c7de8f78a39d72030cb9ce Follows-Up: Ib9fe44567660ec1e42cc788f69b9a4101a8a3460
* Convert RecentChange to use UserIdentity and ActorStoredaniel2021-03-112-58/+123
| | | | | | | | | Note: this removes 'rc_actor' from the public attributes array. There is no access to this field in any known extension. It seemed to be there purely by analogy to the database schema. Bug: T276853 Change-Id: Ib9fe44567660ec1e42cc788f69b9a4101a8a3460
* Replace some usages of User with Authority/UserIdentityPetr Pchelko2021-03-043-12/+14
| | | | Change-Id: I7dfbf9bbd1709f5e67de7f6680a5a5ad156994fa
* Rename Authority::getPerformer() to ::getUser()Petr Pchelko2021-03-041-2/+2
| | | | | | | We started to call Authority argument $performer everywhere, and $performer->getPerformer() doesn't look that good. Change-Id: Id2cf3f27b18340314e4ed1ea9931ad9404b4df6f
* Convert RecentChange::doMarkPatrolled to AuthorityPetr Pchelko2021-03-031-18/+16
| | | | Change-Id: If93d6133f61bf0801bbe979885e2fb120e01a33d
* Merge "Use Authority for revision audience where possible"jenkins-bot2021-02-251-2/+1
|\
| * Use Authority for revision audience where possiblePetr Pchelko2021-02-241-2/+1
| | | | | | | | | | Depends-On: I963a79d94b9e39086940a43945def7c8eff1536d Change-Id: If99d428b391c0eaf61396565af7f38740bef6c4a
* | Fix and add various type hintsThiemo Kreuz2021-02-161-2/+2
|/ | | | | | | | I keep fixing type hints in my local dev environment whenever I see something that is worth updating. This is what I collected over the past weeks. Change-Id: Ia4f1b4bee2019abe4ab0fb0df8164e1b446229e7
* Merge "RecentChange: Cast rev_id attr value to integer"jenkins-bot2021-02-161-4/+4
|\
| * RecentChange: Cast rev_id attr value to integerAmmarpad2021-02-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | RevisionRecord::getId() returns int|null, and the null can likely reach here via PageUpdater::doModify() or from somewhere else. RecentChange::diffLinkTrail() already casts it to integer. Bug: T274748 Change-Id: I42acdcedf8ac8d1caa1ce41758a670d90e43f58a
* | Use static closures where safe to useUmherirrender2021-02-115-10/+10
|/ | | | | | | | | This is micro-optimization of closure code to avoid binding the closure to $this where it is not needed. Created by I25a17fb22b6b669e817317a0f45051ae9c608208 Change-Id: I0ffc6200f6c6693d78a3151cb8cea7dce7c21653
* Introduce ActorStore, ActorLookup and ActorFactory.Petr Pchelko2021-02-081-0/+1
| | | | | | | | | | | | | | | | | | The ActorNormalization factory methods create UserIdentityValue from the database rows, either via fields of a joined table, or via a row from actor table. They assume that the actor_id exist and throw othervise. ActorNormalization is a storage-layer service providing access to finding and acquiring actor_id. The UserIdentityLookup methods do not instantiate new actor on demand, they just find an appropriate row in the actor table and return the result. Bug: T272689 Depends-On: I74d81f3f0233efb17fc8df5178e4c477cc669c6f Change-Id: Icfa1daca960c696a8cef8adab5eab53985802858
* Relax User to UserIdentity in ManualLogEntry and RecentChangeDaimona Eaytoy2021-01-101-2/+3
| | | | | | | | This is obviously incomplete, but it should allow unit-testing in some situations. Both these classes are ancient and should be refactored, so there's probably no point in pushing this further for now. Change-Id: Ie5563490cdc84cfa50b5248c248f0fd282de6075
* EnhancedChangesList::getDiffHistLinks: Fix version of deprecationMatěj Suchánek2021-01-071-1/+1
| | | | | | Follow-up to 23b4bdb153; the patch was merged into 1.36, not 1.35. Change-Id: I20979df6d707e38b126d1dd36ce7209d1386acd7
* Fix logic in getDiffHistLinksMatěj Suchánek2021-01-011-9/+17
| | | | | | | | Since it's a link to history, it should always have "action=history" and "curid=". $query argument is now deprecated. Bug: T264491 Change-Id: I9cae1afa62a714e4a56a5356ba9d6a955c81a5a9
* Swap out uses of User->isLoggedIn() with ->isRegistered()James D. Forrester2020-12-221-1/+1
| | | | | Bug: T270450 Change-Id: I90ff94a553ebae9a4ef97c25c333f067f19c327d
* Document list of change tags as string[]Umherirrender2020-11-201-2/+2
| | | | Change-Id: I0ce2a8154af82a363fef126033b5819c4ee84842
* Merge "Annotate OldChangesList::recentChangesLine as returning a safe value"jenkins-bot2020-11-171-0/+1
|\
| * Annotate OldChangesList::recentChangesLine as returning a safe valueDaimona Eaytoy2020-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some recent core change, possibly I2b59c90a609aec1ec74e9c2e7f6fc67573158493, made taint-check think that the return value of MapCacheLRU::getWithSetCallback is tainted, hence it's now complaining if this value is output. This is currently blocking merges in AbuseFilter, see e.g. https://integration.wikimedia.org/ci/job/mwext-php72-phan-docker/82384/console Change-Id: I42a596bd4309d60e3ead4e391b1148d503a5680f
* | Merge "Improve docs about @param/@return object[] $row to stdClass[]"jenkins-bot2020-11-153-4/+5
|\ \
| * | Improve docs about @param/@return object[] $row to stdClass[]Umherirrender2020-11-133-4/+5
| | | | | | | | | | | | Change-Id: I4f85d90548caa1403e822ecb2333ab44787346f2
* | | Merge "Improve callable docs"jenkins-bot2020-11-131-1/+1
|\ \ \ | |/ / |/| |
| * | Improve callable docsUmherirrender2020-11-131-1/+1
| | | | | | | | | | | | Change-Id: I4cc9b2dbe285ad935a1dfd08effa673a39167483
* | | Merge "Update a lot of unspecific "array" types in PHPDocs"jenkins-bot2020-11-132-2/+2
|\ \ \ | |/ / |/| |
| * | Update a lot of unspecific "array" types in PHPDocsThiemo Kreuz2020-10-282-2/+2
| |/ | | | | | | | | | | | | | | | | This includes fixing some mistakes, as well as removing redundant text that doesn't add new information, either because it literally repeats what the code already says, or is actually duplicated. Change-Id: I3a8dd8ce57192deda8916cc444c87d7ab1a36515
* / Replace deprecated WikiCategoryPage::factory in RecentChange classUmherirrender2020-11-121-1/+3
|/ | | | Change-Id: I8f984e5dafaed1b4ba68259aef69108df23f8f4b
* Merge "Add days left messages to changes-lists' clock icons"jenkins-bot2020-10-061-1/+3
|\
| * Add days left messages to changes-lists' clock iconsSam Wilson2020-09-161-1/+3
| | | | | | | | | | | | | | | | | | Add a new resource module for watchlist expiry behaviour in changes lists, to add a message when the clock is clicked on mobile. Bug: T261415 Change-Id: I621b1571b57686beb9fb5802533b1e70d293bc2a
* | Merge "Document hook names in hook interfaces."jenkins-bot2020-10-0211-0/+33
|\ \
| * | Document hook names in hook interfaces.daniel2020-09-2711-0/+33
| |/ | | | | | | | | Bug: T258665 Change-Id: Ifddbf57f8aa2e3eb0d5845601376cbafa08ed407
* / Fix typos related to repeated wordsUmherirrender2020-09-271-1/+1
|/ | | | Change-Id: Ibc187d95b003017255bc87adf56afae7a59bd3db
* CSS 'class' names can be an array in Html::…elementThiemo Kreuz2020-09-081-1/+1
| | | | Change-Id: I301d23066b19051b9e1cb9363639f6189a8b173c
* 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
* Add mw-reverted change tagOstrzyciel2020-08-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tag is added to reverted edits as described in T254074. Functionality: * Adding the mw-reverted tag to reverted edits (duh) * Limiting the maximum depth of the update through a config variable (mitigation #2 from T259014). * Only applying the reverted tag after the edit has been somehow approved. Only the patrol subsystem currently implements this, but there's a hook that extensions can use (mitigation #4 from T259014, more explanation in T259103). * When performing the delayed update, it is checked whether the reverted edit was reverted itself. If so, the update is ignored. This is probably the only way to make the feature work due to the lack of an explicit "disapproval" mechanism other than reverting. * The update is also ignored if the revert is marked as deleted. Technical design: * The update code is in RevertedTagUpdate.php, which is a deferrable update, but is not used as such. It's separated to allow for better DI, testing and better code reusability in the future. * The update is queued / ran using the Job subsystem. The relevant job is in RevertedTagUpdateJob.php * PageUpdater determines whether the edit is approved or not and passes that to the DerivedPageDataUpdater. * The BeforeRevertedTagUpdate hook lets extensions decide whether the update should be ran right away or await approval. * DerivedPageDataUpdater checks whether the edit is a revert and if so either enqueues the job (if it's auto-approved) or caches the EditResult for later use (if it needs approval). * RevertedTagUpdateManager allows for easy re-enqueueing of the update for extensions. Thus, it has a very minimal interface. Other notes: * The unit testing setup for RevertedTagUpdate is a bit complicated, but it was the only way I could make this class testable while using the static ChangeTags class. Bug: T254074 Depends-On: I86d0e660f0acd51a7351396c5c82a400d3963b94 Change-Id: I70d5b29fec6b6058613f7ac2fb49f9fad9dc8da4