aboutsummaryrefslogtreecommitdiffstats
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | | | Merge "Use OutputPage::$metadata to store index policy"jenkins-bot2024-10-181-8/+48
|\| | | | | | | | | | |
| * | | | | | | | | | | Use OutputPage::$metadata to store index policyC. Scott Ananian2024-10-171-8/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a first step in a plan to reduce redundancy in OutputPage, replace the $mIndexPolicy property of OutputPage with the corresponding getter/setter methods in a ParserOutput held for the purpose of storing metadata. Bug: T301020 Change-Id: I6073f4033be936b669532ecf8104a8e5ff498e24
* | | | | | | | | | | | Merge "SpecialBlock [Codex]: fix presetting of relative and infinity wpExpiry"jenkins-bot2024-10-181-7/+13
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | SpecialBlock [Codex]: fix presetting of relative and infinity wpExpiryMusikAnimal2024-10-181-7/+13
| |/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jest tests don't cover PHP bugs :-P Before, passing in the URL param wpExpiry as '3 days' or 'infinity' wouldn't parse. Now it does. Add tests for reinforcement. The assertions against `$fields[ 'EditingRestriction' ]` aren't that important and have been removed to make use of the data provider easier. Bug: T368583 Follow-Up: Ibc648117e6d4981c84e9df9f933ba033d339e908 Change-Id: I8070c90a535cac8715dcdf588c62aab14861a2fc
* | | | | | | | | | | | Merge "AuthManager: Add constants for callMethodOnProviders()"jenkins-bot2024-10-181-40/+76
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | AuthManager: Add constants for callMethodOnProviders()Kevin Israel2024-10-181-40/+76
| |/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - Calls to callMethodOnProviders() specify bitmasks as decimal literals, so it is not clear which authentication providers are being called without referring to the doc comment and converting to binary. What: - Add four new private constants: three that match the values specified in the doc comment, and one that is the bitwise OR of all the others. - Use them throughout the class. Change-Id: Ib67e5174f00a080e79f0b6f35c0eeec4b95b8d8e
* / / / / / / / / / / / Localisation updates from https://translatewiki.net.Translation updater bot2024-10-183-3/+7
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3c825fd44ee1cb98abde8062d415a039d2a0aeb1
* | | | | | | | | | | Merge "TemplatesOnThisPage: Do not show non-functional link for special pages"jenkins-bot2024-10-181-0/+4
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | TemplatesOnThisPage: Do not show non-functional link for special pagesAmmarpad2024-10-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T376964 Change-Id: Ibb4f36d55cdebc9e62e1fab3dcc1755020544ffd
* | | | | | | | | | | | Merge "Use statslib for metrics emitted by HtmlInputTransformHelper, ↵jenkins-bot2024-10-174-44/+124
|\ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | HtmlToContentTransform"
| * | | | | | | | | | | Use statslib for metrics emitted by HtmlInputTransformHelper, ↵Yiannis Giannelos2024-10-174-44/+124
| | |_|_|_|_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HtmlToContentTransform Bug: T359475 Change-Id: I7d4ca748c106dfd560dae31294decfb2b181e2db
* | | | | | | | | | | Merge "CloneDatabase: Remove debug logging"jenkins-bot2024-10-171-2/+0
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / / / |/| | | | | | | | | |
| * | | | | | | | | | CloneDatabase: Remove debug loggingBartosz Dziewoński2024-10-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These wfDebug() calls produce extremely verbose logs when running PHPUnit tests. They've been annoying me for years. Change-Id: I48e1c71232b07f3f1b5613104c9322333dda9fb6
* | | | | | | | | | | Merge "SpecialBlock [Vue]: require confirmation for hidehuser and self blocks"jenkins-bot2024-10-171-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / / |/| | | | | | | / / / | | |_|_|_|_|_|/ / / | |/| | | | | | | |
| * | | | | | | | | SpecialBlock [Vue]: require confirmation for hidehuser and self blocksMusikAnimal2024-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Special:Block is supposed to show a 'Confirm block' checkbox under two conditions: if the 'hide username' option is being used, or if the user is blocking themselves. This patch takes the SPA-like behaviour a step further and will disable the submit button and show the confirmation checkbox if the user target is changed to the current user, or if the 'Hide username' checkbox is checked. The logic of hiding the confirm checkbox and re-enabling the submit button should follow the same rules. Add `withSubmission()` helper to SpecialBlock.test.js and add test cases for the newly added code. Bug: T376754 Change-Id: Ie990051ae62b11f3a27bbc4cfc5c714a0096e2f3
* | | | | | | | | | Merge "[DatabaseUpdater] Don't interact with updatelog on virtual domains"jenkins-bot2024-10-171-0/+12
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ / / |/| | | | | | | | |
| * | | | | | | | | [DatabaseUpdater] Don't interact with updatelog on virtual domainsDreamy Jazz2024-10-171-0/+12
| | |_|_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: * When performing schema changes on virtual database domains, the updatelog table may not exist on the DB connection being used to perform the updates * This is because the updatelog table will only exist on the database used for the local wiki, and not a central wiki. * As such, skip reading and writing to updatelog if the table does not exist on the current DB. ** This will cause some updates to be repeated, but there is no place to store that the update has completed and using a local wikis' updatelog table would not prevent the update from being performed again if update.php is run for a different wiki in the same cluster when the table is shared. What: * Update DatabaseUpdater::updateRowExists and ::insertUpdateRow to skip interacting with the updatelog table if it does not exist on the DB connection being used to perform schema updates. * Add tests for the currently completed untested DatabaseUpdater class to verify these changes. Bug: T377450 Change-Id: I60bf6028f17b0768588a09363ec28281954eb960
* | | | | | | | | Change name of dtp languageNMW032024-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T375891 Change-Id: Ic3def3ecfce481f5a35615182e3acfcecf911f12
* | | | | | | | | Merge "Adding token validation to the edit handler"jenkins-bot2024-10-171-0/+9
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | |
| * | | | | | | | Adding token validation to the edit handlerWendy Quarshie2024-09-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I86fa7d613aa79e07ce20ea7936becf02f25832ac
* | | | | | | | | Localisation updates from https://translatewiki.net.Translation updater bot2024-10-176-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7845b834d7497f34569961c94a2e02845c4d431d
* | | | | | | | | Merge "Use explicit nullable type on parameter arguments"jenkins-bot2024-10-16267-576/+581
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Use explicit nullable type on parameter argumentsUmherirrender2024-10-16267-576/+581
| | |_|_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | Use MetricsInterface::setLabels() for parsercache_selective_* statsC. Scott Ananian2024-10-163-24/+24
| |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depends-On: Ifb51bca3b8762e97e349d2868e42789494f262cb Change-Id: Ie915a2f5debf74c66c91ff256f3b1632bd078435
* | | | | | | | Merge "Stop using heavy Language object when not needed"jenkins-bot2024-10-163-7/+7
|\ \ \ \ \ \ \ \
| * | | | | | | | Stop using heavy Language object when not neededAmir Sarabadani2024-10-163-7/+7
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two easy cases, way more can be done. Bug: T376565 Change-Id: I3b875c4b6b2c2bdf7171a712898d50e26d86c807
* / / / / / / / Replace uses of deprecated ChangeTags static methodsJames D. Forrester2024-10-1620-34/+64
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T360664 Change-Id: I3363a225e54bb2cae01ba066d432a8b7b21933d2
* | | | | | | Merge "ConditionalDefaultsLookup: allow to dynamically add conditions for ↵jenkins-bot2024-10-164-3/+52
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | evaluation"
| * | | | | | | ConditionalDefaultsLookup: allow to dynamically add conditions for evaluationSergio Gimeno2024-10-164-3/+52
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: To facilitate the evaluation of conditions not directly "known" by the lookup, eg: owned by extensions What: - Add ConditionalDefaultOptionsAddCondition hook which runs before instantiating ConditionalDefaultsLookup allowing to add conditions for evaluation in the $extraConditions array. - Evaluate the configured conditional default against the extra added conditions after evaluation of "known" conditions. Bug: T376918 Change-Id: Ife6f96397eafd61fdb40528aac315ddde1ef2774
* | | | | | | PasswordFactory: Move magic number used for random password string into constReedy2024-10-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed while looking at T377342 Change-Id: I19cf5e0e4d0b2c7b0490acb4f2f9c1c8af061eeb
* | | | | | | Merge "Language: Introduce getContentLanguageCode() service"jenkins-bot2024-10-164-4/+47
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | Language: Introduce getContentLanguageCode() serviceAmir Sarabadani2024-10-164-4/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And use that as much as possible. This makes bootstraping services much faster since Language object is extremely heavy (specially to initialize) and that's why in LanguageFactory it's behind a cache (see LanguageFactory::getRawLanguage) At the same time, most uses of Language object only need the language code (after normalization and mapping and validation) and this allows such change to happen fast and way more decoupled from Language object that has more than 100 methods. Bug: T376565 Change-Id: I1c3d94454896842939dfaad8cbf742e5a3ae5438
* | | | | | | JsonCodec: fix ${var} deprecation notice in error messageC. Scott Ananian2024-10-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I55c86098f4fae8a2e686e48cb74c4fbd3530ce51
* | | | | | | Merge "[JsonCodec] Use wikimedia/json-codec to implement JsonCodec"jenkins-bot2024-10-164-136/+279
|\ \ \ \ \ \ \
| * | | | | | | [JsonCodec] Use wikimedia/json-codec to implement JsonCodecC. Scott Ananian2024-10-154-136/+279
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for serializing/deserializing objects which implement the JsonCodecable interface from the wikimedia/json-codec library used by Parsoid. JsonCodecable allows customizing the encoding of objects of a given class using a class-specific codec object, and JsonCodecable is an interface which is defined and can be used outside mediawiki core. In addition json-codec supports deserialization in the presence of aliased class names, fixing T353883. Backward and forward compatibility established via the mechanism described in https://www.mediawiki.org/wiki/Manual:Parser_cache/Serialization_compatibility Test data generated by this patch was added in I109640b510cef9b3b870a8c188f3b4f086d75d06 to ensure forward compatibility with the output after this patch is merged. Benchmarks: PHP 7.4.33 PHP 8.2.19 PHP 8.3.6 BEFORE AFTER BEFORE AFTER BEFORE AFTER Serialize: 926.7/s 1424.8/s 978.5/s 1542.4/s 1023.5/s 1488.6/s Serialize (assoc): 930.2/s 1378.6/s 974.6/s 1541.9/s 1022.4/s 1463.4/s Deserialize: 1942.7/s 1961.3/s 2118.8/s 2175.9/s 2129.8/s 2063.5/s Deserialize (assoc): 1952.0/s 1905.7/s 2107.5/s 2192.1/s 2153.3/s 2011.1/s These numbers definitely do not have as many significant digits as written here. But they should be sufficient to demonstrate that performance is not impaired by this patch and in fact serialization speed improves slightly. Bug: T273540 Bug: T327439 Bug: T346829 Bug: T353883 Depends-On: If1d70ba18712839615c1f4fea236843ffebc8645 Change-Id: Ia1017dcef462f3ac1ff5112106f7df81f5cc384f
* | | | | | | | Namespace all remaining classes in includes/parserJames D. Forrester2024-10-15110-130/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T353458 Change-Id: If02cc9b1ff78e26c1cf8c91ee4695845eb133829
* | | | | | | | Merge "Add namespace to maintenance/includes classes"jenkins-bot2024-10-155-2/+7
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | |
| * | | | | | | Add namespace to maintenance/includes classesJames D. Forrester2024-10-095-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also a few other fixes of PHP class aliases spotted by phan. Bug: T353458 Change-Id: Ie79d65722c47c24f8f20f1293355cfd3c2e8c2ad
* | | | | | | | Merge "Improve documentation for wgAutopromoteOnce"jenkins-bot2024-10-151-2/+1
|\ \ \ \ \ \ \ \ | |_|_|_|_|/ / / |/| | | | | | |
| * | | | | | | Improve documentation for wgAutopromoteOnceDreamy Jazz2024-09-231-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: * The documentation for wgAutopromoteOnce gives one valid value for the "event" but says "Where the event is either" * There is only one accepted format for "event", so this should be clarified in the documentation. What: * Improve the documentation for wgAutopromoteOnce. Change-Id: I014c0102985152e1bb7dda3a48a5e5988f24ddbd
* | | | | | | | Merge "REST: Allow specifying param descriptions as MessageValue objects"jenkins-bot2024-10-156-6/+59
|\ \ \ \ \ \ \ \
| * | | | | | | | REST: Allow specifying param descriptions as MessageValue objectsbpirkle2024-10-086-6/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, parameter descriptions could only be specified as strings. We want OpenAPI specs generated from parameter definitions to be internationalizable, so allow specifying descriptions as MessageValue objects, which can be translated using normal MediaWiki mechanisms. Associated improvements to ResponseFactory. Bug: T376493 Change-Id: If1cbe4f7bfd5c375e64b802b666c0247d65b1ee0
* | | | | | | | | Merge "SkinComponentCopyright: Fix message existence check for ↵jenkins-bot2024-10-151-8/+17
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | history-copyright"
| * | | | | | | | | SkinComponentCopyright: Fix message existence check for history-copyrightBartosz Dziewoński2024-10-151-8/+17
| | |_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T45646 Change-Id: Ifbe9c7f75feb81f5b2b58793c8995754131cecff
* | | | | | | | | Merge "Remove trailing slash from TranslationAliasesDirs in config-schema"jenkins-bot2024-10-151-1/+1
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Remove trailing slash from TranslationAliasesDirs in config-schemaUmherirrender2024-10-091-1/+1
| | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not needed for language related path Change-Id: I5234ab58762765e8a6ca725b73d0618677469697
* | | | | | | | | Merge "ContributionsPager: Split formatRow into separate methods"jenkins-bot2024-10-151-206/+322
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | ContributionsPager: Split formatRow into separate methodsThalia2024-10-151-206/+322
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: * ContributionsPager::formatRow builds links and other elements in a contributions row. It is a long, old method that is difficult to work with since it does a lot and is sometimes in a confusing order. * Since ContributionsPager is extended by various classes, it is helpful to have separate, overridable methods for some of the formatting. What: * Refactor ::formatRow by introducing separate methods for each link or other element in the row. This allows handling to be overridden by subclasses, and also makes the formatRow easier to understand. * To make code review easier and safer, make minimal changes - e.g. keep old variable names, comments and flow structure. Bug: T356292 Change-Id: Iee83deafa584fbfe7f6adb1c30df014ec6945288
* / | | | | | | | Localisation updates from https://translatewiki.net.Translation updater bot2024-10-151-2/+2
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I26fea4413f6d54e2e272f0498cf28649df2ef815
* | | | | | | | Merge "REST: Allow specifying response body schemas in json files"jenkins-bot2024-10-144-84/+107
|\ \ \ \ \ \ \ \