aboutsummaryrefslogtreecommitdiffstats
path: root/includes/editpage/TextConflictHelper.php
Commit message (Collapse)AuthorAgeFilesLines
* Namespace all remaining files in includes/exceptionJames D. Forrester2025-03-251-1/+1
| | | | | | | | | 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
* Use explicit nullable type on parameter argumentsUmherirrender2024-10-161-2/+2
| | | | | | | | | | | Implicitly marking parameter $... as nullable is deprecated in php8.4, the explicit nullable type must be used instead Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a Break one long line in SpecialPage.php Bug: T376276 Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
* Add namespace to remaining parts of Wikimedia\Mime and Wikimedia\StatsJames D. Forrester2024-09-271-1/+1
| | | | | Bug: T353458 Change-Id: If0137003ab625017d322d57870448a02569668c3
* Move remaining four classes in includes/content into Content namespaceJames D. Forrester2024-08-101-2/+2
| | | | | Bug: T353458 Change-Id: Ia0f3e22078550be410c4b87faf6aa4eabe6e270d
* editpage: track edit conflicts in edit failures statCole White2024-02-281-22/+72
| | | | | | | | | | | | | Begins tracking edit conflicts in edit_failure_total. Begins tracking edit conflicts resolved in edit_failure_resolved_total. Enables TextConflictHelper to use both StatsFactory and IBufferingStatsdDataFactory instances for backwards compatibility with TwoColConflict extension. Bug: T356812 Change-Id: I1eaeb4a62ea6e07d24f224456e6abb10fcd6e591
* Namespace User under \MediaWiki\UserJames D. Forrester2023-09-191-1/+1
| | | | | Bug: T166010 Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
* Reorg: Move three output related classes to includes/Output/Amir Sarabadani2023-09-051-1/+1
| | | | | | | | | | And namesapce them: - StreamFile - OutputHandler - OutputPage Bug: T321882 Change-Id: Iedf8d88c595e580f2d8f0734c92aa5c45618ba33
* TextConflictHelper: Drop support for calling without a ↵James D. Forrester2023-08-231-9/+4
| | | | | | ContentHandlerFactory, deprecated since 1.35 Change-Id: I4558cac4a907d1c7a585deb851b201da90a5adab
* editpage: Minor docs and file header cleanupTimo Tijhof2023-03-051-6/+2
| | | | | | | | | | | | * Remove duplicate descriptions from file blocks in favour of class doc blocks. This reduces needless duplication and incorrect or outdated copies, and helps to make the file header more consistently visually ignorable. * Clean up the file header, similar to other commits under <https://gerrit.wikimedia.org/r/q/message:ingroup+owner:Krinkle>. Change-Id: I31b137b1d6c75eb042d935b99f92ef47652596ec
* Reorg: Namespace the Title classJames D. Forrester2023-03-021-1/+1
| | | | | | | | | | | | | | | | | | | 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: Move HTML-related classes out of includes/ to Html/Amir Sarabadani2023-02-161-1/+1
| | | | | Bug: T321882 Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
* Update Legoktm's email addressKunal Mehta2021-05-021-1/+1
| | | | Change-Id: Icd58c93bb0cff5b0a4e7b7f02873a271bab8964f
* Merge "editpage: Fix misplaced return value in TextConflictHelper"jenkins-bot2020-05-251-2/+5
|\
| * editpage: Fix misplaced return value in TextConflictHelperThiemo Kreuz2020-05-061-2/+5
| | | | | | | | | | | | | | | | Luckily this was not really broken. The old and the new code do the exact same. The old code was just side-stepping the documented way this method should be used. Change-Id: I3f25ba159df5dbfc67eb7ade3fe29a017e601162
* | TextConflictHelper: Add ARIA label to `wpTextbox1`Volker E2020-05-111-1/+4
|/ | | | | | | | | | | Add `aria-label` attribute with explanatory description as value to the `wpTextbox1` to allow screen reader read the purpose of the textbox for visually impaired contributors. Bug: T245863 Bug: T252355 Depends-On: I0628486e2201975464a77a55053a8d74ddfc57fb Change-Id: Ib6fe49ade878757594fd28dac2bfd0ef8a7a5e8f
* deprecation: Remove DeprecationHelper::newArgumentWithDeprecation and change ↵Peter Ovchyn2020-04-271-10/+5
| | | | | | | callers accordingly Bug: T245075 Change-Id: I0714b1c5d5a379cfe3ca473b72244d4d6bd1b7b8
* TextConflictHelper: deprecate old constructor signatureArtBaltai2020-02-121-7/+11
| | | | | | | | A deprecation warning will be triggered if the constructor is called without providing a ContentHandlerFactory Bug: T235165 Depends-On: I5996f0f01e28edf50d3caf2ca4557d64271d8545 Change-Id: Ie552b33a5644fa2aefd826df8fd18184434677b7
* Introduce ContentHandlerFactoryArtBaltai2020-02-071-5/+26
| | | | | | | | | | | | | | | | | Added: - ContentHandlerFactory Tests: - PHPUnit Changed - Calls of changed and deprecated - DI for some service/api Deprecated: - ContentHandler::* then similar to ContentHandlerFactory - ContentHandler::getForTitle - ContentHandler::$handlers Bug: T235165 Change-Id: I59246938c7ad7b3e70e46c9e698708ef9bc672c6
* Simplify user bucket casesAdam Wight2019-11-041-5/+6
| | | | | | | Moving the repeated code out makes this slightly more readable. Bug: T236886 Change-Id: I87ddba6901f901048fad18c3827316c260fe3ec3
* Count edit conflicts combined with user editsWMDE-Fisch2019-11-011-2/+32
| | | | | Bug: T236886 Change-Id: I275de8e806b9b29329c7757c4bb96ecd7ba0ea1f
* editpage: Make TextConflictHelper::toEditContent privateThiemo Kreuz2019-04-241-1/+1
| | | | | | | | | | The method is not used anywhere: https://codesearch.wmflabs.org/search/?q=toEditContent&i=1 There is another method with the same name in the EditPage class. But this is unrelated. As far as I can see the method I'm touching in this patch was copied from the EditPage class. Change-Id: I51d167723bd70220adbf4ac36f15f3290b7eb653
* Fix/suppress misc phan errors (#5)Kunal Mehta2019-04-051-1/+0
| | | | | | Add lots of missing return statements, or remove incorrect doc blocks. Change-Id: I0881e98fbb9d0d4cf79ecc824064d24538055d3f
* Set getEditConflictMainTextBox parameter type to arrayWMDE-Fisch2018-08-161-2/+2
| | | | | | | This is only called at one place in core and used in the TwoColConf extention. The passed argument is always an array. Change-Id: I4ca94442b79dc8871ed72943be733d100e093e44
* Moved textbox1 building into TextConflictHelper on edit conflictsWMDE-Fisch2018-01-041-0/+27
| | | | | | | | | Factored out some minor parts about building editor CSS classes. getEditConflictMainTextBox() mainly mirrors showTextbox1 parts not included were moved to the EditPage. Change-Id: I671e095acc08382dd0a1c3d167fdaaa623ec5499
* Track which namespaces edit conflicts are resolved inaddshore2017-12-071-0/+9
| | | | | | | | This is similar to the tracking of the occourance of edit conflicts but tracks the resolution of the conflicts. Bug: T182011 Change-Id: I9a0c05dc921946fb6e0580b56b663783ca0b1b6e
* EditPage: Extract some edit conflict code into EditConflictHelperKunal Mehta2017-10-261-0/+221
Extensions with custom content models (e.g. ProofreadPage) will extend EditPage to provide a customized editing experience. However when another extension like TwoColConflict wants to change just how edit conflicts look, this causes problems since only one class can take the place of EditPage. So instead, split most of the frontend code for edit conflicts into TextConflictHelper, and call it from edit page. Extensions can override with the instance created by calling EditPage::setEditConflictHelperFactory(). And to make that split possible also move EditPage::addNewLineAtEnd() and ::buildTextboxAttribs() into a separate TextboxBuilder class that both EditPage and TextConflictHelper can use. Bug: T176393 Change-Id: Ie415edd84329c02d5762477f8a171fced85b01a2