aboutsummaryrefslogtreecommitdiffstats
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
...
* SpecialRenameUser: Fix warning displayTaavi Väänänen2024-10-281-2/+14
| | | | | | Bug: T378259 Change-Id: I135d3370824081e481376cd3010c257ba73e8378 (cherry picked from commit 3da57081e1bd17d7ed6c1996af33d0b5cf5592af)
* Merge "Bump PHPVersionCheck & composer expected PHP versions to 8.1.0" into ↵jenkins-bot2024-10-281-1/+1
|\ | | | | | | REL1_43
| * Bump PHPVersionCheck & composer expected PHP versions to 8.1.0Arlo Breault2024-10-251-1/+1
| | | | | | | | | | | | As in T328921#9620620 and Ifa46fb69792943a17ae9f0b991abede67809cd45 Change-Id: I30440d97f4f7bd5fa9a38240663a572dea0eb926
* | Merge "specials: Do not pass boolean to Message::numParams" into REL1_43jenkins-bot2024-10-261-1/+7
|\ \
| * | specials: Do not pass boolean to Message::numParamsAmmarpad2024-10-261-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Password policy settings 'value' can be a number, boolean or a null But only number needs to be passed to the corresponding policy messages (to be output). Boolean and null represent the message assertion and are not output in the eventual message string (the messages do not have parameter). Values with false and null are already skipped, so this change only affects values with boolean true. Bug: T378133 Change-Id: Ib9e6f7ed14f9982f9d2350ccd7b212f0fbf10477 (cherry picked from commit 41a9230775c569833911cb3cdb41c651013df04c)
* | | htmlform: Allow MessageParam on HTMLForm::addButton for label-messageUmherirrender2024-10-261-2/+3
|/ / | | | | | | | | | | | | | | | | | | includes\SpecialWikimediaDebug.php of WikimediaEvents extension pass Message::durationParam as param, since 9d56257d8c154cf3020ae7d0a1dd2f45d5211453 this is a MessageParam Follow-Up: I625a48a6ecd3fad5c2ed76b23343a0fef91e1b83 Change-Id: I30901b2b4d6c245774adda7f52579570e3cde157 (cherry picked from commit 11db82e8a818d51f6fb7bc042c16b4f518fb7b5e)
* / SECURITY: Message: Don’t call is_callable() on stringsLucas Werkmeister2024-10-261-1/+3
|/ | | | | | | | | | This can cause PHP to try to load the param value as a class, with potentailly disastrous results (though it’s not quite clear if this can actually cause attacker-supplied code execution or not). Bug: T377912 Change-Id: I0239b3e65cf516c6fdf287882f05e47a01f963c1 (cherry picked from commit cdf11b23474024dfe39057993372f2126302e244)
* ContributionsPager: Fix getTemplateParams() parameterAmmarpad2024-10-251-2/+2
| | | | | | | | | | This needs to get $classes by reference Bug: T378132 Depends-On: I9d4507fc8e7b2e44c8ecbda9400c5af8103b7c81 Follow-Up: I95a5b88ec81583e16ccf8e58cdb8e12e00aae5bf Change-Id: I810f26e04113d5c9c7c51f88430063b0d07e6b25 (cherry picked from commit 83c5211931e1f53448d7dc69956a9584f87b7620)
* Support {{#FORMAL:}} syntax in jqueryMsgJon Harald Søby2024-10-241-0/+1
| | | | | | | | | | Add support for the new {{#FORMAL:}} syntax in jqueryMsg. Add formalityIndex to mw.language.data, and add parsing for this syntax mediawiki.jqueryMsg.js. Bug: T366602 Change-Id: Idc6ce0d590729830fd734cccae860f2430b8475c (cherry picked from commit 05170a2ea8d10b5f177cba1797e00babea52e941)
* SpecialWhatLinksHere: Ensure namespace variable is definedAbijeet2024-10-241-1/+2
| | | | | | | Broken in I313b595ccbcf0650fceffc5bfd31bc245aca0237 Bug: T378048 Change-Id: I09b753fb642d877b3d49fe13c204a16298b9725d
* AutoLoader: Use require_once rather than requireReedy2024-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | This was seen in WMF production during a train deployment, where namespacing of classes, which had been serialized (for example CacheTime), along with our PSR-4 definitions may result in cases where PHP tries to load the same PHP file more than once. Combined with non obvious error messages, require_once gives us better behaviour and error messages. More explicitly: In T378006, the autoloader is entered from class_exists(), and the class has a filename resolvable with PSR-4 which is already loaded by a non-PSR-4 class name. Using require_once would allow class_exists() to return false in that case. In T372500, the autoloader is entered from unserialize(). It looks like require_once would just give you a more informative error message. Bug: T378006 Bug: T372500 Change-Id: I928f29198af9baf81a3cae604b3adf41595c2176 (cherry picked from commit 03dd4ae7ae0e2ce7e45f0bf2cb913642eef842a8)
* Use explicit nullable type on parameter argumentsAndre Klapper2024-10-231-8/+8
| | | | | | | | | | | Implicitly marking parameter $... as nullable is deprecated in php8.4, the explicit nullable type must be used instead. Followup to e662614f, using PHPStan. Bug: T376276 Change-Id: I60d639b042b537bf2f531cc132f1b75a66b85acb (cherry picked from commit da0a395efa7847916371f9c0a6b271faa022ff59)
* specials: Avoid passing null to str_replace()Ammarpad2024-10-231-1/+1
| | | | | | | | | Do null-coalescing at call site since the function already expects these arguments to be strings Bug: T377916 Change-Id: I1bf57646b5a4ef03d49d178e0e75d4e61cf90c00 (cherry picked from commit 6f5777fe5ab48e4b3bf25ebd2dcc9ebf0e2d1fa6)
* recentchanges: Use current time for imported revision category changesMáté Szabó2024-10-231-1/+6
| | | | | | | | | | | | | | | | | | | | | | | Why: - When a revision is imported and the wiki is configured to show category changes in RecentChanges, a CategoryMembershipChangeJob is enqueued that in turn runs CategoryMembershipChange for each category change. - The resulting RC entries use the timestamp of the imported revision, rather than the current time. - If the revision being imported is older than $wgRCMaxAge, this can cause the RC entries to be immediately deleted with a 1/10 chance by a probabilistically enqueued RecentChangesUpdateJob. What: - Use the current timestamp for RC entries derived from CategoryMembershipChange instances created for imported revisions, instead of using the revision's timestamp. Bug: T377932 Change-Id: Id697087b29e76ac64885f8c7a0e670f201474449 (cherry picked from commit 83d6c6870c1dca7e063bb4ac82c8675b085cc0fb)
* ParserOutput::getExternalLinks(): Deprecate use of the internal array referenceC. Scott Ananian2024-10-221-0/+6
| | | | | | | | | | | In a future release this will return an array, not a reference to the internal array, to maintain abstraction and allow for representation changes internal to ParserOutput. This patch just add deprecation notices to the class and to the release notes. Change-Id: Ie3a3f98402c5a5a3a92326d7736c0df874829a6b
* Branch commit for REL1_43Arlo Breault2024-10-221-1/+1
| | | | | Bug: T372318 Change-Id: I9a9aa83c455b16d57d08327489bd960e9b0a3ec2
* Merge "rdbms: clear replica snapshots in ↵jenkins-bot2024-10-225-16/+36
|\ | | | | | | (begin|commit|rollback)PrimaryChanges()"
| * rdbms: clear replica snapshots in (begin|commit|rollback)PrimaryChanges()Aaron Schulz2024-10-095-16/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically perform the empty-transaction commit logic in methods like beginPrimaryChanges() and commitPrimaryChanges(). This avoids the proliferation of callers having to call the same set of methods one after another for non-obvious reasons. It also discourages code from making brittle assumptions that might fail for setups where there is only a primary or the primary has non-zero read load. Deprecate flushReplicaSnapshots() and remove callers. Clarify the related method documentation. Bug: T315664 Change-Id: I255afd22ffcaeac0fad2d4e4a2a0c55c99be7905
* | Merge "Support template overrides in ContributionsPager"jenkins-bot2024-10-221-49/+72
|\ \
| * | Support template overrides in ContributionsPagerSTran2024-10-221-49/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Downstream pagers that extend ContributionsPager may want to use their own templates and fields. To avoid polluting the upstream pager, allow the template and parameters to be overriden. - Move template processing into two overrideable functions, `getTemplateParams` and `getProcessedTemplate` Bug: T356292 Change-Id: I95a5b88ec81583e16ccf8e58cdb8e12e00aae5bf
* | | Merge "Language: Mark constructor of LanguageCode unstable for now"jenkins-bot2024-10-221-1/+1
|\ \ \
| * | | Language: Mark constructor of LanguageCode unstable for nowAmir Sarabadani2024-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the branch cut is now, let's make this unstable for now and then change it once we are confident it'll be stable. Bug: T376565 Change-Id: Id7dd735abc5a97a0dfbd50484a8ae989b6c1738f
* | | | Merge "WhatLinksHere: Allow extensible filters"jenkins-bot2024-10-223-10/+58
|\ \ \ \
| * | | | WhatLinksHere: Allow extensible filtersHuei Tan2024-10-213-10/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SpecialWhatLinksHereQueryHook hook that allow extensions to modify the query builder to add more conditions based on the filters added in the SpecialPageBeforeFormDisplay hook. Bug: T216368 Change-Id: I221d4e0ad671feab6937719d4a2f894ad6154bb1
* | | | | Merge "SpecialWhatLinksHere: Replace FormOptions with request data in an array"jenkins-bot2024-10-221-45/+53
|\| | | |
| * | | | SpecialWhatLinksHere: Replace FormOptions with request data in an arrayAbijeet2024-10-211-45/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace FormOptions with array based form data instead of FormOptions and specify defaults when defining HTML form fields. We prefer using form data since values for HTML fields added via SpecialPageBeforeFormDisplay hook are available in this array but not in FormOptions. When extensions add fields to this page via SpecialPageBeforeFormDisplay or ActionModifyFormFields hook, they can access the value of the added field via the form data using new hook to perform custom filtering. Bug: T216368 Change-Id: I313b595ccbcf0650fceffc5bfd31bc245aca0237
* | | | | Merge "rdbms: Remove reliance on internal STATUS_TRX and STATUS_SESS_ sequence"jenkins-bot2024-10-222-6/+6
|\ \ \ \ \
| * | | | | rdbms: Remove reliance on internal STATUS_TRX and STATUS_SESS_ sequenceTimo Tijhof2024-10-222-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follows-up I39cee1363496dfe2, which added a condition based on `status > ERROR` which I think requires a reliance on, and understanding/remembering of, the numerical sequence of statuses. This sequence appears undocumented, both in the TransactionManager constants and the trxStatus/sessionStatus methods, but either way is not needed in any of the current cases. This made the code harder to understand, increases doubt about its correctness, requiring additional checking while debugging or code reviewing. Change-Id: Ia0f4b0cfae02de52e7618e558cca6d266689e760
* | | | | | Merge "filebackend: Check for old alias in FileBackendMultiWrite"jenkins-bot2024-10-221-1/+2
|\ \ \ \ \ \
| * | | | | | filebackend: Check for old alias in FileBackendMultiWriteUmherirrender2024-10-221-1/+2
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the config contains the old class name, the change to the new namespaced class in 1b29f07440f2c8fd039987feb1a075b9d683c841 breaks existing configs. Follow-Up: I73fb416573f5af600e529d224b5beb5d2e3d27d3 Change-Id: I5236609dbef5c28c4d220680c501b5813f940e8f
* / | | | | Remove a no longer needed workaround in watchlist pageEbrahim Byagowi2024-10-211-3/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A hidden character somehow was needed to make MobileFrontend to work properly but as the fix in Ifb458f80f08d9c6f717f4c035c7d5120cccb04cf it's no longer needed. Bug: T377503 Depends-On: Ifb458f80f08d9c6f717f4c035c7d5120cccb04cf Change-Id: I3f08595d654fbfe18627b44839eaa5c9fd38274c
* | | | | Merge "Use namespaced classes"jenkins-bot2024-10-2164-9/+82
|\ \ \ \ \
| * | | | | Use namespaced classesUmherirrender2024-10-2164-9/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to the use statements done automatically via script Addition of missing use statement done manually Change-Id: I73fb416573f5af600e529d224b5beb5d2e3d27d3
* | | | | | Merge "ParserOutput: Introduce ParserOutput::getLinkList()"jenkins-bot2024-10-212-0/+207
|\ \ \ \ \ \
| * | | | | | ParserOutput: Introduce ParserOutput::getLinkList()C. Scott Ananian2024-10-182-0/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This deprecates a number of methods which returned arrays by reference and exposed internal representation details of the ParserOutput. It also regularizes the return values to return consistent LinkTarget values, working around the wide variety of different internal storage formats used for links. In the future, once these methods which expose the internal representation are removed, we can simplify our internal storage as well. But for the moment we add the new getter without changing the internal representation. Note that by returning TitleValue objects this new interface also provides a means to fix the issue identified in T204792 where interwiki and namespace prefixes were getting confused. A TitleValue properly distinguishes between these -- although the callers will still have to be careful to use it as a TitleValue and not attempt to reparse it. These methods also correctly handle fragments, which are present for the language link type but stripped for the other linkt types. Bug: T204792 Change-Id: I48a2077b9645124f83082afd953d6bf7a861270b
* | | | | | | Merge "ParserOutput::runPipelineInternal: pass ParserOptions if provided"jenkins-bot2024-10-211-1/+1
|\ \ \ \ \ \ \
| * | | | | | | ParserOutput::runPipelineInternal: pass ParserOptions if providedC. Scott Ananian2024-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pipeline passes don't yet depend on ParserOptions, but they will. Change-Id: Ib15134a598a7e783c69c8e19bb29b53da6c4be55
* | | | | | | | Merge "REST: Add items wrapper for restbase compat to some response bodies"jenkins-bot2024-10-212-2/+2
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | |
| * | | | | | | REST: Add items wrapper for restbase compat to some response bodiesbpirkle2024-10-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T374136 Change-Id: I995916f53eb9408923456cce8b1f3be391fbf942
* | | | | | | | Merge "Remove support for using Skin::addToBodyAttributes"jenkins-bot2024-10-211-9/+0
|\ \ \ \ \ \ \ \
| * | | | | | | | Remove support for using Skin::addToBodyAttributesAmmarpad2024-10-201-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is back compat logic for a removed Skin method since 1.35 Change-Id: I526973e97f9093fd082bfb9a9aa85edaebc1126d
* | | | | | | | | Merge "Deprecate ::setMetrics() calls with StatsdDataFactoryInterface"jenkins-bot2024-10-212-3/+10
|\ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / |/| | | | | | | |
| * | | | | | | | Deprecate ::setMetrics() calls with StatsdDataFactoryInterfaceC. Scott Ananian2024-10-182-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HtmlInputTransformHelper::setMetrics() and HtmlToContentTransform::setMetrics() take a StatsFactory now; deprecate passing a StatsdDataFactoryInterface. Depends-On: I0d8eb6cacd761fa4959419b10d59046e61c714ff Change-Id: I2374731f6d37a191fc4a865d2665f2ca18182db1
* | | | | | | | | Merge "Add Central Kanuri (knc), deprecate Kanuri (kr)"jenkins-bot2024-10-211-1/+2
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Add Central Kanuri (knc), deprecate Kanuri (kr)Amir E. Aharoni2024-10-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should be merged only when appropriate for migrating from "kr" to "knc" on translatewiki. See bug T356144. The autonym is from Ethnologue. The namespace translations are by User:MohammedBama123 (Mohammed Mustapha Bulama), shared at: https://incubator.wikimedia.org/w/index.php?title=Talk:Wp/knc/Main_Page&oldid=6416513#Namespaces Bug: T356144 Change-Id: Ifa1a692619d3b12e279cc74482b6327262fcb20f
* | | | | | | | | | Merge "Make Message and MessageValue compatible"jenkins-bot2024-10-2114-300/+249
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ / |/| | | | | | | | |
| * | | | | | | | | Make Message and MessageValue compatibleBartosz Dziewoński2024-10-1914-300/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix two problems that made it difficult to convert between Message and MessageValue, or to write code that could accept both of them, as exemplified by the StatusValue class: * Implement a common interface * Use the same internal format for message parameters While these changes should be compatible with most of existing code, where the authors were courteous enough to simply call methods such as Message::numParam() and not look inside the values they return, it is potentially a breaking change for anything that depended on the formatted params being arrays or accessed their keys. Example patches: https://gerrit.wikimedia.org/r/q/topic:message-param Notable changes: * Message and MessageValue now both implement MessageSpecifier (only Message implemented it before). * Message::numParam() and other static methods for encoding params now return MessageParam objects, instead of special arrays. Use these MessageParam objects internally in Message. * Narrow down the return type of MessageSpecifier::getParams() (it was just `array`, allowing any type in the array). Narrow down the types for Message::params() and MessageValue::params() to match. * Deprecate MediaWiki\Message\Converter. As a replacement add MessageValue::newFromSpecifier(), which is analogous to Message::newFromSpecifier(), but without weird legacy edge cases. * Make StatusValue::getMessages() return MessageValues. Remove code that converted between Message and MessageValue, no longer needed. * Update many type declarations and comments to use MessageSpecifier instead of MessageValue, as well as a couple of tests that depended on implementation details. Bug: T358779 Change-Id: I625a48a6ecd3fad5c2ed76b23343a0fef91e1b83
* | | | | | | | | | Merge "Add back space before comment in log entries"jenkins-bot2024-10-211-0/+1
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Add back space before comment in log entriesEbrahim Byagowi2024-10-211-0/+1
| | |_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another regression of I919bb8270ddb13b38d747dba1a3a7fa0d3bb1a4f where the line `. " $mark"` was completely removed but only its $mark should've been removed and not the space, my mistake. Bug: T377533 Change-Id: I36cbdc3c84ca43309e9d028a607002b2deb84589
* | | | | | | | | | Merge "Parsoid: SiteConfig::prefixedStatsFactory() can never return null"jenkins-bot2024-10-212-6/+3
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | / / / / / / | | |_|/ / / / / / | |/| | | | | | |