aboutsummaryrefslogtreecommitdiffstats
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Client-side date/time formatter libraryTim Starling2025-04-024-6/+512
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a library providing date/time formatting according to the user's preferred time zone and date preference. I tested formatting of an example date with all defined formats in all languages, and I found that it gives identical output to PHP in about 90% of our ~500 languages. Resolve some of the outstanding issues by aliasing the problematic date formats on the client side, so that the user will see the date in another acceptable format for the same language. The remaining issues mostly relate to the use of a fallback language to display weekdays and non-Gregorian month names. Details: * Add Language::getJsDateFormats(), which converts existing date formats to an options array that can be interpreted by the client. * In Messages*.php, add $numberingSystem, which is the CLDR numbering system ID. I set it for all languages that had overriden $digitTransformTable. This is sent to the client in the library's JSON config and is used as the default numberingSystem option when formatting dates. * In Messages*.php, add $jsDateFormats, which overrides the automatically generated date format options. Bug: T389161 Change-Id: Ib6bc8ebd4d01317aaf32225c6006ea2dc7a1b39e
* | | | | | Merge "block: Add autoblock filtering parameters"jenkins-bot2025-04-028-62/+78
|\ \ \ \ \ \
| * | | | | | block: Add autoblock filtering parametersTim Starling2025-03-218-62/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add $auto parameter to DatabaseBlockStore::newFromTarget and ::newListFromTarget, to help callers filter autoblocks from result lists. Change-Id: Iad92d205517eb50ab0ce5e8caae58ee761fe19d5
* | | | | | | Merge "enotif: Handle Talk notifications via new Notifications system"jenkins-bot2025-04-013-13/+39
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | |
| * | | | | | enotif: Handle Talk notifications via new Notifications systemPiotr Miazga2025-03-313-13/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrated second ENotif Talk mail into Notification system. This is a third iteration. At the end all different notifications cause exactly the same Email. To future proof the system, we can pass the Source, which means what triggered this notification. Is it Talk, is it Watchlist or is caused by fact that Recipient is on the ENotifAll list. Bug: T387995 Change-Id: I1993208882097c591f93fb47d80076a93c34fcd9
* | | | | | | Merge "ParserCache: Skip saving of "redirect=no" ParserOutput of redirect pages"jenkins-bot2025-04-011-1/+11
|\ \ \ \ \ \ \
| * | | | | | | ParserCache: Skip saving of "redirect=no" ParserOutput of redirect pagesdaniel2025-04-011-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - ParserCache refuses to return cache entries for redirect pages. So we shouldn't write these entries into the parser cache in the first place. - If we write but refuse to read, this means there will be a cache write every time a redirect page is retrieved via ParserOutputAccess. What: - Make ParserCache:save() skip entries for redirect pages. This is only reachable via "redirect=no" since by default MediaWiki pageviews render the destination page instead. Note: - It seems we should be able to store redirect pages like any other page in the ParserCache. Why we didn't, and whether we should, is not yet clear. While this is being investigated we should establish consistent behavior for get() and save(). Bug: T389591 Change-Id: I880997193d6de66121c902de80a77c1305bd01d3
* | | | | | | | Merge "specials: Return bool from SpecialSearch::redirectOnExactMatch"jenkins-bot2025-04-011-3/+3
|\ \ \ \ \ \ \ \
| * | | | | | | | specials: Return bool from SpecialSearch::redirectOnExactMatchUmherirrender2025-04-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Options are strings, cast them to bool Change-Id: I66aef7856907d9bf80308eb9e32b7178b59040ba
* | | | | | | | | media: Normalize file names in Tiff exceptionsTaavi Väänänen2025-04-012-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie9a992e9ad3a6f596c122d3d2747e5f9a0a22b51
* | | | | | | | | Localisation updates from https://translatewiki.net.Translation updater bot2025-04-015-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I94adc67717ac66fc655866f4b8d93bcb758eaace
* | | | | | | | | Merge "logging: Always declare variables in RightsLogFormatter group formatting"jenkins-bot2025-04-011-13/+6
|\ \ \ \ \ \ \ \ \ | | |_|_|_|/ / / / | |/| | | | | | |
| * | | | | | | | logging: Always declare variables in RightsLogFormatter group formattingUmherirrender2025-03-311-13/+6
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting conditional variable (and use it under the same conditional), makes it hard for phan to see the correct type for the variables. phan fails with "Suspicious array access" when formatDate() gets a return type declaration `array`. Unpack the array in the foreach and use the same variable to check. Change-Id: I8408d10774cdf96ee59c0f1de3729aa41d2602b6
* | | | | | | | Merge "specials: Remove unused return from SpecialMergeHistory::showHistory"jenkins-bot2025-04-011-2/+0
|\ \ \ \ \ \ \ \
| * | | | | | | | specials: Remove unused return from SpecialMergeHistory::showHistoryUmherirrender2025-03-311-2/+0
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage of the return value removed in 6e88bd35ff / r28086 Change-Id: Ie1a66528c409c79f49d8ad34792671c5d694f495
* | | | | | | | Merge "installer: Use type declaration on undocumented private functions"jenkins-bot2025-04-0111-12/+13
|\ \ \ \ \ \ \ \
| * | | | | | | | installer: Use type declaration on undocumented private functionsUmherirrender2025-03-3111-12/+13
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Change-Id: I328e7691cf620ddc9520670826a928a291e0dfe9
* | | | | | | | Merge "ResourceLoader: Use type declaration on undocumented private functions"jenkins-bot2025-04-015-10/+10
|\ \ \ \ \ \ \ \
| * | | | | | | | ResourceLoader: Use type declaration on undocumented private functionsUmherirrender2025-03-305-10/+10
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iba083aa271a911107477430e6831e349bcd2acfb
* | | | | | | | Merge "Add Buginese (Buginese Script) (bug-bugi) to Names.php"jenkins-bot2025-03-311-0/+1
|\ \ \ \ \ \ \ \
| * | | | | | | | Add Buginese (Buginese Script) (bug-bugi) to Names.phptoluayo2025-03-311-0/+1
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T389916 Change-Id: Ie1c4c6bf1c3dcf5da6410bb282830390b0798405
* / | | | | | | FileBackend: PHP Deprecated: strrpos(): Passing null to parameter #1 ($haystack)Paladox2025-03-311-1/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` PHP Deprecated: strrpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /srv/mediawiki/1.42/includes/libs/filebackend/FileBackend.php on line 1588 ``` Bug: T384851 Change-Id: I36c401587d94e7c1ab444d355b03ea88da8fb6e8
* | | | | | | Merge "Notifications: Minor cleanup"jenkins-bot2025-03-317-31/+8
|\ \ \ \ \ \ \
| * | | | | | | Notifications: Minor cleanupReedy2025-03-217-31/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8f55e929543b67ed66191a9421c5c365b625aecc
* | | | | | | | Merge "TemplateParser: Add use statement for Exception"jenkins-bot2025-03-311-1/+2
|\ \ \ \ \ \ \ \
| * | | | | | | | TemplateParser: Add use statement for ExceptionReedy2025-03-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic9cd94e8844043b87885b6c7f1768cdcd2e86837
* | | | | | | | | Localisation updates from https://translatewiki.net.Translation updater bot2025-03-3112-11/+187
| |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2f499c75ce82bd4bb8697b6a950017f0309b2427
* | | | | | | | Consistent spelling of "username"Huji2025-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost everywhere else in MediaWiki core and extensions (at least those used by Wikimedia), it's written without a space. Follow up from I4c40a9566642fb2fbcf2006e4b7e33501b7b2575 Change-Id: I952f9552a5300eb883df1b2fc8d9276c42a2c3a6
* | | | | | | | Merge "ResourceLoader: Remove unused 'dir' parameter to load.php"jenkins-bot2025-03-281-8/+3
|\ \ \ \ \ \ \ \
| * | | | | | | | ResourceLoader: Remove unused 'dir' parameter to load.phpTimo Tijhof2025-03-251-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When MediaWiki creates load.php URLs, in OutputPage and via RL\Client, it sets 'lang', not 'dir'. The direction is automatically derived from the language, which makes the library easier to use for developers, and also avoids a potentially confusing scenario in which the two are different (e.g. lang=he and dir=ltr would not make sense, and would further risk poisoning LTR content in an RTL/Hebrew-related cache somewhere). Bug: T225845 Change-Id: I14905c85bb5e3bb47a681dc99668b92844d22f04
* | | | | | | | | Merge "changetags: Simplify buildTagFilterSelector without XmlSelect"jenkins-bot2025-03-281-16/+16
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | changetags: Simplify buildTagFilterSelector without XmlSelectTimo Tijhof2025-03-281-16/+16
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XmlSelector exists primarily to create `<select>` menus, whereas this is creating `<datalist>`. This caller bypassing half the features (ctor args), overrides a half of what remains (tagname), and leaves most of the rest unused (e.g. optgroup, defaults). This in turn called Xml::option() which has more indirection, such as an optional selected, which is never set. Replace by idiomatic, simple, and diret use of Html::element() and Html::rawElement(). While at it: * Improve docs for the return value and make it clear that this is not a list to append to, the exactly two chunks have distinct identities and the callers depend on that exact [0] and [1] identity. * There was an early return with empty array for when the feature is disabled by site config. This violates the return shape but worked because all callers in core check the return value for truethy-ness. Support this by returning null instead, which is less likely to be mistaken and communicates more clearly the need for checks on the caller side, and e.g. nullable `?array` in the future. Test plan: * Edit buildTagFilterSelector() to force `if ( $ooui )` to `if ( false )`. * Open Special:Contributions locally. * Confirm visual rendering and HTML source are identical before/after. Change-Id: I6d68b1846d31d861d6f4bacff0fca38e478e00de
* | | | | | | | | Merge "Localize duration number in Watchlist editor"jenkins-bot2025-03-281-2/+2
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Localize duration number in Watchlist editorHuji2025-03-281-2/+2
| | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T387255 Change-Id: I3c39db9d8394254b94f0828de0df4fb57e8d49e7
* | | | | | | | | Merge "enotif: when triggering notifications, pass watchlist type"jenkins-bot2025-03-281-1/+1
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | enotif: when triggering notifications, pass watchlist typePiotr Miazga2025-03-281-1/+1
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes an issue introduced in Icccfe9548fc67a3692b488947b2648fe41c5198e when introducing the RecentChangeMailComposer. This issue caused watchlist emails not having the List-Help header. No other change in behaviour. Bug: T387987 Change-Id: I4fac2cacb6e2180d768c7cf0832a07a6ace8584e
* | | | | | | | | Merge "language: No longer support manual construction of Language objects"jenkins-bot2025-03-281-60/+9
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | |
| * | | | | | | | language: No longer support manual construction of Language objectsUmherirrender2025-03-261-60/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T343771 Change-Id: I8f6d57599211eb6c8c29bde3abaccac78c6dc97e
* | | | | | | | | Merge "SkinModule: Add dark mode styles for images"jenkins-bot2025-03-281-0/+6
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | SkinModule: Add dark mode styles for imagesJon Robson2025-03-271-0/+6
| | |_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is disabled by default but can be added on skins that support dark mode. This replaces existing code in Minerva and Vector 2022. Bug: T388197 Change-Id: I4302b629d42aa58073108bc75eaf857d7e55d9cf
* | | | | | | | | Add Papiamento (Aruba) (pap-aw) to Names.phptoluayo2025-03-281-0/+1
| |_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T387000 Change-Id: Ia45c70c331c2bb4dda066294e6a516a0652fc5a5
* | | | | | | | Localisation updates from https://translatewiki.net.Translation updater bot2025-03-287-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I617c9421a2991a74f1d7aa3cbe05962e36c99de2
* | | | | | | | Merge "ChangeTags: Optimize label and description parsing"jenkins-bot2025-03-281-11/+22
|\ \ \ \ \ \ \ \
| * | | | | | | | ChangeTags: Optimize label and description parsingBartosz Dziewoński2025-03-231-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T344352 Change-Id: I35ded8970d88bc3798d869e41dd16797d901007c
* | | | | | | | | Merge "ResourceLoader: Reject module names starting with "./" && "../""jenkins-bot2025-03-271-1/+3
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | ResourceLoader: Reject module names starting with "./" && "../"Hannah Okwelum2025-03-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These already don't work in modules with packageFiles since these are invalid under CJS/require interop, but to remove any chance of ambiguity or confusing error messages client-side, let's also validate these early server-side, so that we can assume no such module can exist. Bug: T386833 Change-Id: I854079bb8c56e0b7adc899769bc365bf31226a05
* | | | | | | | | | Avoid use of OutputPage::parserOptions()C. Scott Ananian2025-03-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OutputPage parser options is just the ParserOptions corresponding to the context; we can just create that directly. This will allow us to deprecate OutputPage::parserOptions. Bug: T390145 Bug: T350626 Change-Id: Ida3ed52f7b42a9a11b12e36e50caeae82149be0c
* | | | | | | | | | Merge "REST: fix extra routes module localization strings"jenkins-bot2025-03-271-2/+2
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | REST: fix extra routes module localization stringsbpirkle2025-03-261-2/+2
| | |_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous change to add localization strings for the REST extra routes module was inconsistent between the en/qqq json files and the message name in php, causing the strings to display incorrectly in the REST Sandbox. Fix so the messages display correctly. Bug: T385855 Change-Id: I6c8d825a98ee36218cd23e3945c42010c9bd5ef3
* | | | | | | | | | Merge "Make $wgUsersNotifiedOnAllChanges require confirmed emails"jenkins-bot2025-03-271-7/+0
|\ \ \ \ \ \ \ \ \ \