Pass a valid key to makeLink rather than an integer (index)
which may result in an exception.
Bug: T286040
Change-Id: Ic69ec102caec982e65e264f5812ac15df5168008
The `class` property on menu items applies to the <li> tag however
in the case of the personal tools menu for historic reasons it applies
to the anchor tag. To bring these in line, a new optional parameter
is added that is utilized inside SkinMustache. Given the method is
final we do not need to worry about skins extending this behaviour.
This is needed for the mw-ui-icon change as we want to separate
the <a> tag with the mw-ui-icon class from the padding of its container
on the <li> item.
This also makes use the "new" class is added to the userpage link rather
than the list item by using the link-class property. This does not impact
existing skins as the impact is the same before and after this change.
This will temporarily break skins making use of user-menu, but this was
introduced in 1.37 which has not been released yet, so it's okay to
introduce breaking changes. It is currently only used by Vector
Bug: T285960
Change-Id: If399dfff9bbdd3b03b2ca702face3ec5164bef11
Similar to OutputPageCheckLastModifiedHook,
which is also part of the ApiHookRunner
Follow-up: I5b41251ad95ea58153fb7e32dba62d407f0844ac
Change-Id: I439a208ea713e44b9603053987d9933ea6167c3a
In case of the referenced addWiki bug, the following was happening:
1. MWServices were initialized before Setup.php is complete
and before extensions were loaded. Deprecation warning was emitted.
2. onMWServices hook was run, thus hook container was created, but
without any extensions loaded.
3. When global MWServices instance was allowed, and services were
reset, hook container was salvaged. When that happens, already
instantiated handlers are preserved, so onMediaWikiServices handlers
(none at this point) were preserved.
4. GlobalPreferences refefine PreferencesFactory, but it was not
actually redefined, since onMediaWikiServices handler array was
salvaged in 3
5. The rest of the hooks work ok, since they are dynamically initialized
after extensions were loaded.
6. One of the hook handlers, implemented in GlobalPreferences,
expected PreferencesFactory to be redefined, but it was not.
7. Boom!
Bug: T285894
Bug: T275453
Change-Id: I8b16529e93dc12484e3501fab4fd34fca70114ea
Although in theory this could be backwards-incompatible, in practice
returning Authority from checkAudience is enough for the only extension
that extends CentralIdLookup, CentralAuth
Change-Id: I976dc854bf26b202347c3b47e956b85bbee156de
The old description had some grammatical issues, and did not explain
what it influences or when. Namely, that it considered during manual
purges and overall rebuilds/refreshes. (E.g. it does not cause
update something directly on page views, nor does it kick-off a job
that will upgrade all existing files or something like that.)
Change-Id: Ia2d3f17a9f7c05f816004c619eb9ff1ec45b019b
MWNamespace has been deprecated in favor of the NamespaceInfo
service in 1.34 and should no longer be used.
All methods that are hard-deprecated in this patch are unused.
Also adding @deprecated to all methods so it's more clear that
they are deprecated. The @deprecated at the beginning of the
class can easily be overlooked.
Change-Id: Ic5726297807d7959453407267e852f7be96a3e05
Expose info about user blocks from Authority. This allows calling code
to provide more detailed information to the user about why they are
denied some action on the wiki.
Bug: T271494
Change-Id: Ia84e469888866d72752aad355292666c31e12bad