aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Revision/RevisionRenderer.php
Commit message (Collapse)AuthorAgeFilesLines
* Remove Title dependency from RenderedRevisionPetr Pchelko2021-10-191-4/+8
| | | | Change-Id: I8da86277e0c8406a49ebd86faddf3dc2abbf5328
* docs: Change wording master to primary in comments and log textUmherirrender2021-09-011-3/+3
| | | | | Bug: T254646 Change-Id: I5379dc79be60c99f0a30f74e5d624f81fe6f921b
* More master -> primary documentation and internal var renamingJames D. Forrester2021-07-151-2/+2
| | | | | Bug: T254646 Change-Id: I63cc8895033714bdfbf09aee933a8f0a43b387f3
* Post Revision-removal cleanupDannyS7122021-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates for the removal of the Revision class itself and the various methods/hooks/variables removed in the process, including: - Update some documentation removing most references to the Revision class and updating the MCR migration notes to reflect the past tense for Revision methods. - Change some capitalization from "Revision" to "revision" to make it clear comments are about revisions in general, not the Revision class in particular. - Minor code tweaks including removing unused variables that were around for the old hooks that were removed, and removing the use of DeprecatablePropertyArray where no longer needed for anything. - Fix incorrect documentation for PageUpdater::getStatus(), the status value changed a while ago to have revision-record in addition to revision, and recently to only have the revision-record, but ironically PageUpdater was never updated. - Removed Parser::$mRevisionObject, used to be a Revision object and was deprecated in 1.35, missed earlier because it was no longer being set to Revision objects, always null. - Add RevisionRecord typehints in DummyLinker to match those in the corresponding Linker methods This should be a no-op in terms of functionality. Bug: T247143 Change-Id: I03bbb94fc29085855448780b1a5ad9063911ecc4
* Replace uses of DB_MASTER with DB_PRIMARYJames D. Forrester2021-04-291-1/+1
| | | | | | Just an auto-replace from codesniffer for now. Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
* Convert RevisionRenderer to AuthorityPetr Pchelko2021-03-241-8/+10
| | | | Change-Id: Ie702f29621c43e496d70bf5204cf11af7569e6d5
* RevisionRenderer: Fix typosAmmarpad2021-01-161-2/+2
| | | | Change-Id: I0acf10aa958dcd7d97eea64387964791752f9424
* Add missing $hints in short-cut callLucas Werkmeister2020-10-091-1/+1
| | | | | | | | RevisionRenderer::combineSlotOutput() is supposed to pass through the $hints when it calls getSlotParserOutput(), but in the shortcut case for only the main slot, it failed to do that. Change-Id: I7db2082bcd21b1c4a4b001e8405f1f9a29fe3ac3
* Upgrade phan config to 0.7.1Daimona Eaytoy2019-09-041-2/+0
| | | | | | | | This allows us to remove many suppressions for phan false positives. Bug: T231636 Depends-On: I82a279e1f7b0fdefd3bb712e46c7d0665429d065 Change-Id: I5c251e9584a1ae9fb1577afcafb5001e0dcd41c7
* Unsuppress phan issues part 6Daimona Eaytoy2019-09-011-0/+3
| | | | | | Bug: T231636 Depends-On: I50377746f01749b058c39fd8229f9d566224cc43 Change-Id: I2cd24e73726394e3200a570c45d5e86b6849bfa9
* rdbms: add setTempTablesOnlyMode() to suppress CONN_TRX_AUTOCOMMIT during testsAaron Schulz2019-08-191-12/+4
| | | | | Bug: T202116 Change-Id: Ib3e80eb04580b2d5a75ede8fb5546409c09a751a
* Fix bogus field use in RevisionRenderer::getSpeculativePageIdAaron Schulz2019-08-011-1/+1
| | | | | | | | | This field was renamed, causing a functional merge conflict Follow-up 5099ee9f7273 Bug: T229589 Change-Id: I7a6bb68ff1fe320313276dc5a67c70de6715ccb6
* parser: add speculative page IDs to use with {{PAGEID}}Aaron Schulz2019-07-261-1/+24
| | | | | | | | | | This works similarly to speculative rev IDs with {{REVISIONID}}. Re-parses can be avoided if the page ID is correctly guessed. Also make the {{PAGEID:X}} parser function set vary-page-id. Bug: T226785 Change-Id: I0b19be45e6ddd6cde330bfcd09d243e4e5beda01
* Make ExternalStore wrap ExternalStoreFactory and create access classAaron Schulz2019-06-281-1/+0
| | | | | | | | | | | | | | | * Inject settings and global instances as dependencies to the ExternalStoreMedium instances. This includes the local wiki domain, so that wfWikiId() calls are not scattered around. * Create ExternalStoreAccess service for read/write logic. * Deprecate the ExternalStore wrapper methods. * Add some exception cases for bogus store URLs are used instead of just giving PHP warnings and failing later. * Make moveToExternal.php require the type/protocol to decide which ExternalStoreMedium to use instead of assuming "DB". * Convert logging calls to use LoggerInterface. Change-Id: I40c3b5534fc8a31116c4c5eb64ee6e4903a6197a
* revision: rename various $wikiId fields/parameters to $dbDomainAaron Schulz2019-06-281-7/+7
| | | | | | | | | These fields are passed to methods like LoadBalancer::getConnection() and are already expected to be DB domains. Update various comments as well. Fix a few minor IDEA warnings. Change-Id: I7cf76700690aec449872a80d30b5ba540d2bf315
* parser: inject the time for {{REVISIONTIMESTAMP}} on pre-save parseAaron Schulz2019-06-091-0/+7
| | | | | | | | | | | | | | | | | | DerivedPageDataUpdater::prepareContent already locks in the revision timestamp before insertion, so inject that into the parser options used for any pre-save parse (e.g for edit filters). This means that a reparse is no longer needed within in the same save request to get the post-save canonical output. A parse will still be required if the edit filter output used an edit stash output, since the revision timestamp is not set at stash time. Instead of using vary-revision, add a vary-revision-timestamp flag for the revision timestamp words. The month/day/hour variants retain their prior optimizations for allowing edit stash output reuse for the post-save canonical output. Change-Id: Ic2c13db4d21197c79a89de0de56745ca32918eb6
* Merge "[MCR] Introduce SlotRoleHandler and SlotRoleRegistry"jenkins-bot2018-12-031-3/+23
|\
| * [MCR] Introduce SlotRoleHandler and SlotRoleRegistrydaniel2018-11-301-3/+23
| | | | | | | | | | | | | | | | | | | | | | These new classes provide a mechanism for defining the behavior of slots, like the content models it supports. This acts as an extension point for extensions that need to define custom slots, like the MediaInfo extension for the SDC project. Bug: T194046 Change-Id: Ia20c98eee819293199e541be75b5521f6413bc2f
* | Use stashed ParserOutput during saving.daniel2018-11-221-0/+9
|/ | | | | | | | | | | The code in DerivedPageDataUpdater that used the stashed ParserOutput from ApiStashEdit::checkCache was accidentally broken when RevisionRenderer was introduced in I871978bf79f67c9e7954fb3fc8528d6e365f2cc1. This is likely the cause for the degraded save timing noted in T205369. Bug: T205369 Change-Id: I6d8fdda73dccae08d18bfb528b948706f56ad2e0
* Set the SaveParser logger in RevisionRendererAaron Schulz2018-10-301-0/+7
| | | | Change-Id: Iacc28ce583fed8cf2a7f7b931754c64619cb4917
* Re-namespace RevisionStore and RevisionRecord classesBrad Jorsch2018-10-091-2/+0
| | | | | | | | | | | | | | | | | | | During development a lot of classes were placed in MediaWiki\Storage\. The precedent set would mean that every class relating to something stored in a database table, plus all related value classes and such, would go into that namespace. Let's put them into MediaWiki\Revision\ instead. Then future classes related to the 'page' table can go into MediaWiki\Page\, future classes related to the 'user' table can go into MediaWiki\User\, and so on. Note I didn't move DerivedPageDataUpdater, PageUpdateException, PageUpdater, or RevisionSlotsUpdate in this patch. If these are kept long-term, they probably belong in MediaWiki\Page\ or MediaWiki\Edit\ instead. Bug: T204158 Change-Id: I16bea8927566a3c73c07e4f4afb3537e05aa04a5
* Add constant for the name of the 'main' slot for MCRGergő Tisza2018-09-241-4/+5
| | | | | Bug: T202142 Change-Id: I97a74e5a029b014f3c2195188936d5c8233c1b7f
* Make HTML generation in RenderedRevision optionaldaniel2018-08-311-24/+35
| | | | | | | | | | This allows optimization for situations in which a caller needs the meta-data of a ParserOutput, and the respective ContentHandler can provide that meta-data without generating HTML output. Bug: T194048 Change-Id: I786d294d18a6a2e3cea61577313e21b578c44f1e
* [MCR] Introduce RevisionRendererdaniel2018-08-301-0/+207
RevisionRenderer is the MCR replacement for Content::getParserOutput, as outlined in <https://www.mediawiki.org/wiki/User:Daniel_Kinzler_(WMDE)/MCR-PageUpdater>. Note: This change also introduces quite a bit of code for merging ParserOutput objects. Bug: T194048 Change-Id: I871978bf79f67c9e7954fb3fc8528d6e365f2cc1