aboutsummaryrefslogtreecommitdiffstats
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
* parser: Remove variable as return value from Parser::finalizeHeadingsUmherirrender2025-01-081-4/+1
| | | | | | The concatenation to $full is unneeded since r92506 / 64a8dd2094 Change-Id: Ib441c2db3655a0774cc2406fe7ae85549f98eb79
* Merge "Revision: make RevisionRecord::getPage() return a value object"jenkins-bot2025-01-085-3/+77
|\
| * Revision: make RevisionRecord::getPage() return a value objectdaniel2025-01-085-3/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RevisionRecord::getPage() returns a PageIdentity, which may be a Title or a WikiPage. In the context of an ongoing page deletion, the state of these objects may change and the page ID may get set to 0. To provide a reliable stable interface that can be used e.g. in a deferred update or job, we need to return an immutable value object instead. NOTE: this may break callers of getPage() that downcast to Title, or that rely on the page ID contained in the returned PageIdentity to be updated dynamically during page creation or deletion. This is a modified version of I7440f8f30b05949. It reverts I4ed5406a8b3aa9, which reverted the original patch. The main difference to the original patch is the additional check in the constructor of the RevisionRecord base class and the regression test in SignatureValidatorTest. Bug: T380536 Change-Id: I0ea915983b6187090f46ad23c9b582196b4be85f
* | Merge "file: Acquire the file id in all cases"jenkins-bot2025-01-081-1/+1
|\ \
| * | file: Acquire the file id in all casesAmir Sarabadani2025-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This used to be called getFileIdFromName() because acquire…() was called a couple lines above, except that the line is not called for new uploads (only for re-uploads). This caused new files have their first revision holding fr_file as zero in the beta cluster (end of the world, I know). The overhead of acquire even if the row exists is negligible (it calls get first and if it doesn't exist, it inserts it) so let's just call it. Bug: T383093 Change-Id: I47fee73b4510b7aa1858c5c607bb626ec7032645
* | | Merge "MimeAnalyzer: detect magic number for gltf binary"jenkins-bot2025-01-081-1/+4
|\ \ \
| * | | MimeAnalyzer: detect magic number for gltf binaryDerk-Jan Hartman2025-01-081-1/+4
| | | | | | | | | | | | | | | | | | | | Bug: T383037 Change-Id: I8aea7f120c670ac17e286a8280eae96af975fe4a
* | | | Merge "MimeMap: add gltf and glb mime types"jenkins-bot2025-01-081-0/+4
|\| | |
| * | | MimeMap: add gltf and glb mime typesDerk-Jan Hartman2025-01-081-0/+4
| | | | | | | | | | | | | | | | | | | | Bug: T383037 Change-Id: Ic2e5fb5e6267dfc07ef66d74afbce8b96523055d
* | | | Merge "user: Move UserOptionsUpdateJob to /includes/user/Options"jenkins-bot2025-01-081-1/+1
|\ \ \ \
| * | | | user: Move UserOptionsUpdateJob to /includes/user/OptionsTimo Tijhof2024-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: T364652 Change-Id: I778a164d8eb2da9707ba4e3e1c7075bd627c0985
* | | | | Merge "user: Tag UserArrayFromResult as `@internal` class"jenkins-bot2025-01-085-12/+16
|\| | | | | |/ / / |/| | |
| * | | user: Tag UserArrayFromResult as `@internal` classTimo Tijhof2024-12-185-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why add internal: * The public stable entry point to this object is via methods on the UserArray class. * The constructor is not used outside core. * Most callers already type against UserArray, but a few type against UserArrayFromResult directly whicih seems needlessly specific. * UserArrayFromResult is already not stable to extend. * UserArrayFromResult defines no public methods that aren't already on UserArray, thus interchangable from a type hint perspective. Why move Countable: * Phan will rightfully flag `count(WikiPage::getContributors)` as invalid after this patch, e.g. in core CreditsAction.php, unless UserArray is also Countable. * There is no use of `new UserArray\b` anywhere. * There is no use of `extends.*UserArray\b` outside core, only UserArrayFromResult, which is inside core. * This follows-up I7d6b3bc1b0 (1a3f73dd8c) for T60377. Bug: T364652 Change-Id: I1933d4d8282f98babe8d0a381f42850f579c9fdd
* | | | Merge "stats: add getCacheCount function to expose the size of the cache"jenkins-bot2025-01-081-3/+10
|\ \ \ \
| * | | | stats: add getCacheCount function to expose the size of the cacheCole White2025-01-071-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: T381042 Change-Id: I9ac5e2f9a4dd003bb4c67a19a391100dd86aef96
* | | | | Merge "Database: tracing: emit row respose stats"jenkins-bot2025-01-081-0/+7
|\ \ \ \ \
| * | | | | Database: tracing: emit row respose statsChris Danis2025-01-071-0/+7
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | Bug: T340552 Change-Id: I4e480e01ada308f15304630d8caa6921418cd4c6
* | | | | Merge "Add ILBFactory::getAutoCommitPrimaryConnection()"jenkins-bot2025-01-082-0/+17
|\ \ \ \ \
| * | | | | Add ILBFactory::getAutoCommitPrimaryConnection()Jakob Warkotsch2025-01-072-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method is equivalent to IConnectionProvider::getPrimaryDatabase(), but using CONN_TRX_AUTOCOMMIT. It is intended to be used to get virtual domain primary connections that currently require this flag. Bug: T351802 Change-Id: I4d3e872596d7fd7c994252dd892ff5691f59c0d0
* | | | | | Merge "block: Fix exception when purging multiple expired blocks for the ↵jenkins-bot2025-01-081-1/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | same target"
| * | | | | | block: Fix exception when purging multiple expired blocks for the same targetTim Starling2025-01-081-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loop releasing targets with different deltas did not account for the fact that there may be some deltas with no targets. An InvalidArgumentException was thrown. So, fix it twice and add a regression test. Bug: T382881 Change-Id: I7feac31891b5314daf20cec161fbadf7c5b4f8ca
* | | | | | | Localisation updates from https://translatewiki.net.Translation updater bot2025-01-083-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iadbf77edc6b6229edf2e2ad7b435b7269e0a4506
* | | | | | | Merge "filebackend: Improve debug messages by passing native context or CSV"jenkins-bot2025-01-084-20/+17
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | |
| * | | | | | filebackend: Improve debug messages by passing native context or CSVTimo Tijhof2025-01-074-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By passing arrays as native PSR3 context, the values end up as part of the structured debug logs in Logstash where they can be shown on-screen, selected, and copied into bug reports as their original values instead of with JSON-escaping for various characters. This is not a big deal today since FormatJson defaults to JSON_UNESCAPED_SLASHES (which is important because most of these values contain file paths that definitely include slashes). But, this will change as part of T382910 by removing use FormatJson, and inlining these gets tedious so instead pass it as native data where the data is non-trivial, and for others embed the paths within the string unchanged comma-separated. Bug: T382910 Change-Id: I79fba128a8129b9ac4da17b513b5da0b03d90bf9
* | | | | | | tracing: Disable tracing in CLI modeMáté Szabó2025-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - I7896f6ebee151d7da1d88e04bb4d05dc007d67e8 is causing maintenance script runs to fail with an error if $wgOpenTelemetryConfig is set to enable tracing, because Setup.php does not initialize a root span in this case. What: - Disable tracing in CLI mode to avoid the immediate error. - Tracing in CLI mode will be reenabled as a followup, once appropriate root span generation and periodic flushing have been implemented. Bug: T340552 Change-Id: I981090c887cf42581533f03ee18e5e8a912c6a3c
* | | | | | | Merge "PageUpdater: do not map EDIT_INTERNAL to FLAG_AUTOMATED."jenkins-bot2025-01-072-2/+20
|\ \ \ \ \ \ \
| * | | | | | | PageUpdater: do not map EDIT_INTERNAL to FLAG_AUTOMATED.daniel2025-01-072-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - Things like rollbacks use the EDIT_INTERNAL flag to bypass the edit stash, but should still be counted as edits. What: - Introduce a separate toggle into PageUpdater for marking an update as automated. Bug: T382592 Change-Id: Iec70d510d7104df0f57885a842b2583250a07135
* | | | | | | | Merge "Tracing: span statuses for root spans"jenkins-bot2025-01-072-2/+12
|\ \ \ \ \ \ \ \
| * | | | | | | | Tracing: span statuses for root spansChris Danis2025-01-072-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T340552 Change-Id: I18ffd0e36efbabe82313de685ca8c6c99341c6f3
* | | | | | | | | Merge "objectcache: Automatically fallback to the second db in line"jenkins-bot2025-01-071-12/+35
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | |
| * | | | | | | | objectcache: Automatically fallback to the second db in lineAmir Sarabadani2025-01-061-12/+35
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...when the first attempt causes db error. We currently have this problem that if a parsercache host goes down, until it's replaced or fixed, all 1/nth pageviews trigger a reparse (unless cached in memcached). With a rather simple change, if db error is returned, simply fallback to the second database in line, that way in case a pc host goes down, we will have a graceful degradation and move the load to the rest of hosts automatically. It's similar to ring designs. This helps us re-architecture parsercache in favor of getting rid of idle spares because we wouldn't need an immediate fix in case of issues. It also can be used to make x2 much more robust (we can set up x4 and they would automatically fail over in case of issues). Bug: T373037 Change-Id: I95424f453396fbcdd399e588a4b6638ecb572441
* | | | | | | | Database: tracing: query errors => span errorChris Danis2025-01-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T340552 Change-Id: Ie44ebc11d62ba71542ea8f7055be65df06468227
* | | | | | | | Tracing: add span statusesChris Danis2025-01-074-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shows up nicely in Jaeger: https://phabricator.wikimedia.org/F58139011 Also a searchable attribute of spans. Bug: T340552 Change-Id: I5bbbb3df08c5d8ac213228aeaf4b7c4048779453
* | | | | | | | Span: fluentize activate()/deactivate()Chris Danis2025-01-074-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T340552 Change-Id: I96c8e62954d86d7ced2c5503cd16edcf061063dd
* | | | | | | | Merge "specials: Support temporary account filtering on Special:BlockList"jenkins-bot2025-01-072-10/+45
|\ \ \ \ \ \ \ \
| * | | | | | | | specials: Support temporary account filtering on Special:BlockListMáté Szabó2025-01-072-10/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - Special:BlockList currently supports excluding blocks targeting IP addresses or registered users, but not temporary accounts. - To preserve feature parity when temporary accounts are enabled, it should also allow excluding blocks that are targeting temporary accounts. What: - Add a new filtering option to exclude blocks targeting temporary accounts on Special:BlockList. This is only displayed if temporary accounts are a known concept on the local wiki. - Have the existing "Hide account blocks" checkbox exclude named users only if temporary accounts are a known concept on the local wiki, and show a different label if so. Bug: T380266 Change-Id: I63ada264c0da406c728ac54fcbe0b6621f1e9250
* | | | | | | | | Merge "Fix incorrect ucfirst/lcfirst transformations for Karakalpak alphabet"jenkins-bot2025-01-071-6/+6
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Fix incorrect ucfirst/lcfirst transformations for Karakalpak alphabetravi17182025-01-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ucfirst function transforms the lowercase 'ı' to the uppercase 'Í', and the lcfirst function transforms the uppercase 'Í' to the lowercase 'ı' in the Karakalpak alphabet. Bug: T335175 Change-Id: Ic9d251b663c52901f4f461d1ecf737dd649c45fd
* | | | | | | | | | Merge "Make onConditionalDefaultOptionsAddCondition call easier to find"jenkins-bot2025-01-071-1/+3
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Make onConditionalDefaultOptionsAddCondition call easier to findMartin Urbanec2025-01-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, ServiceWiring.php called the hook directly using the HookContainer. This was making the usage of the hook difficult to find, as eg. PHPStorm would claim onConditionalDefaultOptionsAddCondition has zero usages. This patch changes the call to make use of the HookRunner, thus being safer (thanks to typehints) and easier to find (thanks to actually calling a method). Change-Id: I5e515301f0664fedf110d401868262143d62b63c
* | | | | | | | | | | Localisation updates from https://translatewiki.net.Translation updater bot2025-01-072-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic7aa9907f1f82fa0c66378ccb24ac63feb9089b3
* | | | | | | | | | | block: Show a special log entry when blocking an already blocked targetTim Starling2025-01-074-53/+116
| |_|_|_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Sysop added a block for Target" instead of "Sysop blocked Target". Bug: T378150 Change-Id: I2febf1bcb57d014e48bd58eecbdecaa3c2f9c724
* | | | | | | | | | Merge "DnsBlacklistUrls: Remove sorbs.net"jenkins-bot2025-01-062-2/+1
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | DnsBlacklistUrls: Remove sorbs.netReedy2025-01-062-2/+1
| | |_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Service is no longer running, so it's a default that doesn't do anything Bug: T382987 Change-Id: I3a21c12ba689928d38e410cbe2547ab7e616ac8a
* | | | | | | | | | Merge "Skin [Breaking change]: Remove ability of skins to override ↵jenkins-bot2025-01-063-39/+9
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | makeFooterIcon and getFooterIcons"
| * | | | | | | | | | Skin [Breaking change]: Remove ability of skins tolmora2025-01-063-39/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | override makeFooterIcon and getFooterIcons Making Skin::getFooterIcons and ::makeFooterIcon methods final Bug: T318988 Change-Id: Ic50b51b9f707d039784a626da7734acf0bb087c7
* | | | | | | | | | | Merge "file: Set fr_deleted"jenkins-bot2025-01-062-0/+2
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | file: Set fr_deletedAmir Sarabadani2025-01-062-0/+2
| | |_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error 1364: Field 'fr_deleted' doesn't have a default value Bug: T383093 Change-Id: I023ededba880f9aaad66226d692be2276e835b57
* | | | | | | | | | | Merge "session: Do not set session.use_trans_sid"jenkins-bot2025-01-061-1/+0
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | session: Do not set session.use_trans_sidGergő Tisza2025-01-061-1/+0
| | |_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | session.use_trans_sid is a PHP antifeature that tells PHP to add session IDs to all local URLs by modifying the HTML it's told to output. We have set it to false just in case, but now that's triggering deprecation warnings. Bug: T380755 Change-Id: Iace0dcdb23eedb432cc1c032bbb3ce31d34071be