When the namespace prefix is converted to a specific language variant,
the function getUnprefixedDisplayTitle() takes no effect.
This issue is visible on category pages, where the unprefixed display
title is used for subheadings.
Bug: T302161
Change-Id: I94684ca0760aafb7c41470210652abfffb7e0d51
This introduces static methods for registering classes and namespaces,
so we don't have to mess with global variables and static members
fields.
Bug: T240535
Change-Id: I1abb27bd70898d04c9253e0b7467447fa96d15a4
Add a hook "TempUserCreatedRedirect" which allows an extension to modify
the post-save redirect after a temporary user is created. CentralAuth
will handle this hook in order to redirect to loginwiki. Loginwiki will
redirect back to the page being saved.
In LoginHelper::showReturnToPage add an "anchor" parameter to specify
the URL fragment to redirect to. This is intended for section editing
with a redirect via loginwiki.
In AuthManager::autoCreateUser(), just allow any valid username, don't
require it to be creatable. Previously a non-creatable username was
allowed only with $source=AUTOCREATE_SOURCE_TEMP, but CentralAuth
depends on user autocreation from the session during refreshCookies. The
session is already validated at this point, so it's not like a user can
exploit this to create arbitrary names.
Change-Id: I623330dbf5d0573c93ae22f962618d6ddbd126d9
I have updated user_editcount field to unsigned in
tables.json
This patch doesn't apply to Postgres.
Bug: T305340
Change-Id: I07a360944a10be9cc8ed8731c6286412294413a3
- To mitigate passing around Skin god object.
- Provide limited context for components.
- Update relevant classes.
Bug: T301722
Change-Id: Icb7ea7ae5b86a39adf6eb2805b2bf42fb71d3bd0
I've updated callers to the deprecated code to use the new
method and we can completely remove the deprecated code in
mw 1.40
The deprecated method delegated to `::newFromLinkTarget()`
which is it's direct replacement, so that should be used
instead.
Depends-On: If799d6a1e722ca80f50b0f12c9b1c9f31a40a860
Depends-On: I276845ccf39ac7a65fca8ba268abbe1e02607a4b
Depends-On: I5d7213e9bcd84f5b674136d2d8b13577cbeead83
Depends-On: Idd222cc5ea94ee1215ab6d4c9e06d79c0a95d6aa
Change-Id: Ibc723aa30a2282222248669c3c195ecb7dfb2423
Adds HtmlHelper, which is intended to be a static utility class
for doing simple modifications to HTML strings in a safe way,
without exposing the caller to the complex Remex interface.
Currently only has one method, which is mainly useful for
modifying element attributes.
The code is largely based on the Wikibase FormatEntities class.
Bug: T217850
Change-Id: I45db9e61e47eb69df32a167d9d1dd146a8719676
$wgSquidPurgeUseHostHeader is @since 1.21 and @deprecated since 1.33.
Follow-Up: I9776d11d4e2d184af35b1117cd7950354c0e343e
Change-Id: Ibaa261fcce3498eba56ab37c8ed95f52e59cfef4
This is a modified rebase of a patch by Tim,
see I75f405930a7b14561389c59d147640e870146bec.
Some benchmark results (from my laptop):
Loading defaults from config-schema.php:
- Master: 115/sec ( 8.7ms)
- I75f4059: (Tim): 575/sec ( 1.7ms)
- Id9dd0bf: (Daniel): 1120/sec ( 0.9ms)
- This (Tim+Daniel): 1420/sec ( 0.7ms)
Loading defaults and merging settings (worst case):
- Master: 80/sec (12.4ms)
- I75f4059: (Tim): 93/sec (10.8ms)
- Id9dd0bf: (Daniel): 200/sec ( 4.9ms)
- This (Tim+Daniel): 682/sec ( 1.5ms)
Original commit message by Tim:
* Explicitly import function array_key_exists to activate the special
opcode
* Batch creation of MergeStrategy objects
* Batch default assignment to ArrayConfigBuilder
The batches mostly help by allowing more inlining, eliminating some
function calls.
Reduced time for apply/finalize benchmark from 540µs to 170µs.
Co-Authored-By: Tim Starling <tstarling@wikimedia.org>
Change-Id: I3d4dd685eaaa4351801b3bac6ce1592eea925c5f
If we pre-generate the data structure for holding schemas in a way
that is optimized for the way we typically access this information
we can save time on initialization:
Instead of having the schema for a given setting in one array with keys
for the default, type, etc, this puts all defaults into one array, all
types into another array, etc. This allows the default values to be
copied in bulk, without having to iterate over the 700+ settings and
look for a default value in each schema array.
Benchmark results from my laptop: 0.85ms for loading config-schema.php,
that is a 85% improvement over the 6.3ms it took before.
It's even 32% faster than loading DefaultSettings.php, which takes 1.26ms.
Bug: T300129
Change-Id: Id9dd0bff6a6d4b501e74237b5d7198088c38c302
* Treat temp users as anons for skin login, logout and create account
links. Suppress temp user preferences and watchlist UI.
* Show a post-edit notification box after a temporary account is
created.
Change-Id: Ib935fc04387100f25cafd75c632ac5ae7114d5d5
This adds tests for the abstract base class, to make sure the generic
implementation matches the contracts. Tests for existing subclasses may
not be using the generic code, and new subclasses may run into trouble.
Change-Id: I2c652c3028862ad52dbd0edaa454bec953e94506
When no merge strategies are needed, config values can be set in bulk.
This patch only uses it for config-overrides, but it is intended to be
used for config-schema in a follow-up.
Change-Id: Ic7e62513ad5227887f8a83bb8b757b5667643989