aboutsummaryrefslogtreecommitdiffstats
path: root/includes/page
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Use type declaration on undocumented private functions"jenkins-bot2025-04-021-1/+1
|\
| * Use type declaration on undocumented private functionsUmherirrender2025-04-021-1/+1
| | | | | | | | Change-Id: I0d8d2237500ed6f18439410c902d47c42e4119bc
* | Merge "block: Add autoblock filtering parameters"jenkins-bot2025-04-021-1/+3
|\ \ | |/ |/|
| * block: Add autoblock filtering parametersTim Starling2025-03-211-1/+3
| | | | | | | | | | | | | | | | Add $auto parameter to DatabaseBlockStore::newFromTarget and ::newListFromTarget, to help callers filter autoblocks from result lists. Change-Id: Iad92d205517eb50ab0ce5e8caae58ee761fe19d5
* | page: Remove deprecated PageArchive::undeleteAsUserUmherirrender2025-03-261-59/+0
| | | | | | | | | | Bug: T339394 Change-Id: I4c7dd048913ee3d62982ec3bcbdb37548bd56280
* | Replace a number of uses of class aliases with the real thingsJames D. Forrester2025-03-262-2/+2
| | | | | | | | | | | | | | Found via disabling phan's alias support for a run (and ignoring wgLang's hard-coded state of being a \Language, alas). Change-Id: I4753bcd84d72d6de111fc7ffc5841fa417bf7333
* | Merge "DomainEvents: Model page state before/after"jenkins-bot2025-03-257-60/+174
|\ \
| * | DomainEvents: Model page state before/afterdaniel2025-03-257-60/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - PageStateEvent models a change in page state, so it should provide access to the state before and after What: - add getPageRecordBefore() and getPageRecordAfter() to PageStateEvent - Move getPage() from PageStateEvent down to PageRevisionUpdatedEvent. - Add getPageId() to PageStateEvent. - Add getDeletedPage to PageDeletedEvent Bug: T388588 Depends-On: I76b09f2275a74d02e5701de2082d6b256d6b3b78 Change-Id: I94c52c0314e5dbe9adf82aab732f2e54ca42f686
* | | Namespace all remaining files in includes/changetagsJames D. Forrester2025-03-253-3/+3
| | | | | | | | | | | | | | | Bug: T353458 Change-Id: I3cf44dfe5425f2efb8409c83571c427447b053af
* | | Namespace all remaining files in includes/exceptionJames D. Forrester2025-03-253-3/+3
|/ / | | | | | | | | | | | | | | | | In MediaWiki/Exception, to follow PSR-4 per plural vs. singular (this can be changed later if people really care). Also, move the couple of exceptions in here that were already namespaced in the MW-top-level into the new space. Bug: T353458 Change-Id: I12ed850ae99effb699a6d7ada173f54e72f0570e
* / [OutputPage] replace ParserOutput::getText() options with ParserOptions, v2C. Scott Ananian2025-03-211-4/+9
|/ | | | | | | | | | | | | | | Suppress TOC, section edit links, and set wrapper div class via ParserOptions, instead of by passing options to ParserOutput::getText(). In the process deprecate the public OutputPage::parserOptions(), which is no longer used internally, and add OutputPage::addTOCPlaceholder() to DRY out some oft-repeated code. Bug: T350626 Depends-On: I6c12db1e0c42fe5b50ef43a9b6ff6804f44081ea Depends-On: I0d557951b8e17de05e8ceadeb6c18d3811bbdaa8 Change-Id: Iec19f9f08a4d88ea534ffa7b24e6e01ffbba2723
* Namespace all remaining files in includes/jobqueueJames D. Forrester2025-03-205-7/+7
| | | | | Bug: T353458 Change-Id: I95690a312e356c45dbeed607d32fb0e4626690cf
* Namespace all remaining files in includes/recentchangesJames D. Forrester2025-03-203-3/+3
| | | | | Bug: T353458 Change-Id: I2ae4577de79832b082adca282ff73cfabc8f9392
* DomainEvents: add listener interfacesdaniel2025-03-204-0/+68
| | | | | | | | | | | | | | Why: - Now that we only support a single invocation mode, we don't need suffixes on the name of the listener method anymore. This allows us to start supporting listener interfaces. What: - Add PageStateListener and PageRevisionUpdatedListener - Add PageMovedListener and PageDeletedListener Bug: T387012 Change-Id: I0ce795136ea0f19689d8d8e9adcc0dde28e67b0f
* Merge "PageStateEvent - change FLAG_RECONCILIATION_REQUEST value"jenkins-bot2025-03-191-2/+2
|\
| * PageStateEvent - change FLAG_RECONCILIATION_REQUEST valueOttomata2025-03-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Why: - flag values are likely to be serialized when broadcast. making the value descriptive and accurate will help consumers of broadcast events. What: - Change the value of the FLAG_RECONCILIATION_REQUEST const from 'reconciliation' to 'reconciliation_request' Change-Id: I0920c0cc7888300014eaaada9c87455754db204f
* | Namespace all remaining files in includes/loggingJames D. Forrester2025-03-1914-16/+16
| | | | | | | | | | Bug: T353458 Change-Id: Ibe1810f1c71316a9124e1dc6ae405097dafd5267
* | Namespace all remaining files in includes/actionsJames D. Forrester2025-03-191-1/+1
| | | | | | | | | | Bug: T353458 Change-Id: Id3ca24e22877e544b707a8a527a58e00cc1bc247
* | Namespace all remaining files in includes/filerepoJames D. Forrester2025-03-1912-19/+18
|/ | | | | Bug: T353458 Change-Id: I35864ad9bd48701703c51367d62f8ebde963c52d
* Merge "EventSubscriberBase: rename to EventIngressBase"jenkins-bot2025-03-181-2/+2
|\
| * EventSubscriberBase: rename to EventIngressBasedaniel2025-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - "ingress" better describes the purpose of objects that use this base class. "subscriber" is merely a mechanism for registering listeners. What: - Rename EventSubscriberBase to EventIngressBase (leaving an alias in place) - Improve documentation of the base class - Clean up some unused code in the base class Bug: T389033 Change-Id: Ib557aea12cc89b7365cabe22a6848c2a38c725ca
* | Namespace all remaining files in includes/pageJames D. Forrester2025-03-1847-50/+116
| | | | | | | | | | Bug: T353458 Change-Id: I7a9c74f2106655d41ae029742090253f541bd4a6
* | DomainEvents: Rename getOldRevision and getNewRevisiondaniel2025-03-151-36/+52
|/ | | | | | | | | | | | | Why: - Use consistent naming scheme based on "before" and "after" to represent the change. What: - rename getOldRevision to getLatestRevisionBefore - rename getNewRevision to getLatestRevisionAfter Bug: T388588 Change-Id: I30078f606f457981987d95def5b2aaae181f0690
* Merge "DomainEvents: Rename PageEvent and PageUpdatedEvent"jenkins-bot2025-03-146-26/+30
|\
| * DomainEvents: Rename PageEvent and PageUpdatedEventdaniel2025-03-116-26/+30
| | | | | | | | | | | | | | | | | | | | | | | | Why: - clarify naming after modeling discussions What: - Rename PageEvent to PageStateEvent - Rename PageUpdatedEvent to PageRevisionUpdatedEvent. Bug: T388588 Change-Id: I987c93a443d364782e692e2cf71b878ccbc5a2fa
* | content: Improve class docs for various Content classesTimo Tijhof2025-03-121-2/+8
|/ | | | | | | | | | | | | * Move duplicate brief and ingroup from file doc to class doc. <https://gerrit.wikimedia.org/r/q/message:ingroup+owner:Krinkle> * Ensure methods have an understable brief, separate from other text. <https://www.mediawiki.org/wiki/Manual:Coding_conventions/Documentation> * Remove obsolete `todo` comments. Bug: T364652 Change-Id: I6eebbf20775e73d008ef86c592a7128456abcb06
* Merge "PageUpdatedEvent: remove deprecated isNew() method"jenkins-bot2025-03-101-8/+0
|\
| * PageUpdatedEvent: remove deprecated isNew() methodAaron Schulz2025-02-271-8/+0
| | | | | | | | Change-Id: I0449fdbe51997df0e7dc1eec3ad7325b7a385d27
* | Merge "MovePage: emit PageMovedEvent"jenkins-bot2025-03-103-2/+86
|\ \
| * | MovePage: emit PageMovedEventdaniel2025-03-043-2/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - We want to replace the PageMoveComplete and RevisionfromEditComplete hooks with equivalent events. - Subscribers need a way to follow page moves and need access to the old and the new title. What: - Introduce PageMovedEvent - Emit PageMovedEvent in addition to PageUpdatedEvent. Bug: T383423 Change-Id: I4d7eb1a0bcb71ac17b4f42971268c0912f4bc5a5
* | | Merge "DeletePage: emit PageDeletedEvent"jenkins-bot2025-03-105-34/+155
|\ \ \
| * | | DeletePage: emit PageDeletedEventdaniel2025-03-105-34/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - We want to replace the PageDeletionComplete hook with an event - We want to validate our design for the hierarchical event type system and the modeling of page events. What: - Introduce PageDeletedEvent - Make DeletePage emit PageDeletedEvent - Move update triggers from DeletePage into ingress objects: - search index - message cache - module cache Bug: T379932 Change-Id: I01490fbaf33118eba109aa91908783117ba5aa20
* | | | Merge "WikiPage: Emit PageUpdatedEvent when protection changes"jenkins-bot2025-03-081-33/+16
|\ \ \ \
| * | | | WikiPage: Emit PageUpdatedEvent when protection changesdaniel2025-03-071-33/+16
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - All changes that cause a dummy revision to be created should trigger a PageUpdatedEvent. What: - Make WikiPage::doUpdateRestrictions use PageUpdater Bug: T198297 Bug: T384691 Change-Id: Ib3196c2d9b964d149d733688bfc7a8d2b5733f4e
* / / / PageUpdatedEvent: Model revert causesdaniel2025-03-073-1/+10
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - Rollback and undo should not use the "edit" cause, since they are triggered by a dedicated user action. What: - Introduce constants for rollback and undo into PageUpdateCauses. - Set update cause in McrUndoAction, EditPage, WikiPage, and Rollbackpage. - Add test cases asserting the properties of the PageUpdatedEvent for manual reverts, undos, and rollbacks. Bug: T378936 Change-Id: If3174732846795e322ddd61257459395eb10e73e
* | | Re-apply "Drop all 49 remaining class_aliases from MediaWiki 1.40"Daimona Eaytoy2025-03-056-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1695950bccb1ca7eba98952753708ae7c4b76d8d and re-applies commit I8f3c2ea021d0f6e. Reason for revert: the remaining usages have been updated in Ida665f486eff384. Bug: T166010 Change-Id: I43f06e6872b264e43aef7fa7c2ac47159926a694
* | | Revert "Drop all 49 remaining class_aliases from MediaWiki 1.40"Ahmon Dancy2025-03-046-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit db47e7f7154a2121bce6d3d9e93a74486bf765f3. Reason for revert: Broke scap sync-world in beta, and possibly caused T387938 Bug: T166010 Change-Id: If608c3e27081bb36b284ad16a5b912dd51b3557e
* | | Drop all 49 remaining class_aliases from MediaWiki 1.40James D. Forrester2025-03-046-18/+0
|/ / | | | | | | | | | | | | Bug: T166010 Depends-On: Iba93dd9749656e641c427e01790d7a14cd1a2dc2 Depends-On: I97ccc2c49ce09ca96192bf6ffdc833c1765c3faa Change-Id: I8f3c2ea021d0f6e574dde901f0bfd4a0408f5455
* / Replace remaining gendered pronounsTacsipacsi2025-03-021-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | To respect all genders, fix comments to not assume users use binary pronouns (or even that users are “he”s), but rather use singular “they”. Also fix some typos that happened to result in gendered pronouns, and a few incorrect commas and missing articles in comments near the fixed pronouns. I skipped four files: - HISTORY – the release notes were made with the wording they were made with, I’m not sure if rewording them afterwards is okay - tests/phpunit/data/preprocess/All_system_messages.{txt,expected} – these are test cases generated from somewhere, I’d regenerate them rather than updating - languages/i18n/qqq.json – fixed on Translatewiki instead to make their edit histories more useful Bug: T387626 Change-Id: I282406a0e1407be548e917735fe7eb9a6bf8b136
* DomainEvents: More clearly model null edits and dummy revisionsdaniel2025-02-261-12/+52
| | | | | | | | | | | | | | | | | | | | | | | | Why: - Listeners that want to skip processing if the page content didn't change should generally not skip reconciliation requests. PageUpdatedEvent should offer getters that make this straightforward. What: - Add isNominalContentChange that will return false for dummy revisions but true for null edits. This is the preferred way for listeners to determine whether they can skip redundant processing of page content. - Rename isContentChange to isEffectiveContentChange, to distinguish it from isNominalContentChange. - Rename isRevisionChange to isRevisionHistoryChange, to make it clear that the change affects the sequences of revisions. - Add test cases to PageUpdaterTest asserting the expected update propagation for null edits and dummy revisions. - Change ingress objects so that: - the message cache is updated for null edits - module caches are not cleared for dummy revisions Bug: T383552 Change-Id: Idf6625d3e737e4a225648b0fd81cc929b095d315
* Merge "Factor out block log boxes and add block list link"jenkins-bot2025-02-261-37/+10
|\
| * Factor out block log boxes and add block list linkTim Starling2025-02-211-37/+10
| | | | | | | | | | | | | | | | * Factor out LogEventsList::getBlockLogWarningBox() * When the user is blocked multiple times, add Special:BlockList link Bug: T384916 Change-Id: I4d538ab59e55dc96dde5dd00dd8016c028bfe6d0
* | PageUpdater: allow dummy revisions to be minordaniel2025-02-241-1/+1
|/ | | | | | | | | | | | | | Why: - When introducing saveDummyRevision() in I1f8c0ac68b, we didn't account for the fact that most (but not all) dummy revisions should be marked as minor edits. What: - Add a $flag parameter to saveDummyRevision() Bug: T198297 Bug: T387067 Change-Id: I1db3ccc816cdb0e2a93593625306a9080b7204eb
* Merge "PageUpdatedEvent: improve modeling of flags"jenkins-bot2025-02-205-105/+127
|\
| * PageUpdatedEvent: improve modeling of flagsdaniel2025-02-205-105/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - Improve consistency, naming, documentation and definition of flags. What: - remove direct access to flags, provide a separate getter for each flag instead. - Deprecate EDIT_SUPPRESS_RC in favor of EDIT_SILENT - Introduce EDIT_IMPLICIT to replace "automated" mode - Introduce FLAG_RECONCILIATION_REQUEST into PageEvent. - Introduce isReconciliationRequest into DomainEvent. Bug: T383552 Change-Id: I2bffbb5810376829f871e1840ca799a8d8232dda
* | block: In log snippets, vary the wrapper message for multiblocksTim Starling2025-02-191-27/+38
|/ | | | | | | | Option 3 from the task. Show one log entry but vary the introductory message. Include the total number of blocks in the message. Bug: T384916 Change-Id: I15fa1f77a38579ed5677f9f156d1667762dc645b
* PageUpdater: make it easy to create dummy revisionsdaniel2025-02-141-50/+10
| | | | | | | | | | | | | | Creating dummy revisions was a fiddly multi-stage process. PageUpdater should just offer a method for doing it. Change how we create dummy revisions in: * LocalFile * MovePage * ImportReporter Bug: T198297 Bug: T384691 Change-Id: I4c7595ce24337ab637a4e0fdbb313fc77d452a15
* ProtectionForm: parse expiries using ExpiryDef::normalizeExpiryMusikAnimal2025-02-131-14/+8
| | | | | Bug: T248196 Change-Id: I83934558da69999e868b9f7c19191ecfdaeecafc
* Replace a few misplaces is_object checksthiemowmde2025-02-121-1/+1
| | | | | | | | | | | | is_object is very rarely what we actually need. In many cases we know exactly what the object can be, and should check for that specific class or for null. A database row is an instance of stdClass. Checking that with is_object also works but is less correct and would allow stuff we cannot accept in these places. Change-Id: I1dc663d7325cabc059ef11c4845b0189208e907f
* Merge "Add support for file read new in Article and FileBackendDBRepoWrapper"jenkins-bot2025-02-111-6/+17
|\