Add a merge strategy which sets the whole value only if the global
has not previously been set. This can be used to allow LocalSettings.php
to remove elements from an array created by extension.json.
Bug: T142663
Change-Id: Id250f9c349ee4eafbc759452ca6ea2a918baeb11
All hooks were previously hard deprecated
in 1.35. Affected hooks:
* ArticleRevisionUndeleted - use RevisionUndeleted
* ArticleRollbackComplete - use RollbackComplete
* DiffRevisionTools - use DiffTools
* DiffViewHeader - use DifferenceEngineViewHeader
* HistoryRevisionTools - use HistoryTools
* NewRevisionFromEditComplete - use RevisionFromEditComplete
* PageContentInsertComplete - use PageSaveComplete
* PageContentSaveComplete - use PageSaveComplete
* ParserFetchTemplate - use BeforeParserFetchTemplateRevisionRecord
* RevisionInsertComplete - use RevisionRecordInserted
* TitleMoveComplete - use PageMoveComplete
* TitleMoveCompleting - use PageMoveCompleting
* UndeleteShowRevision - no replacement
Includes a fix for setting the associated rev id
of page protections, which previously was only done
using $nullRevision which was a Revision object created
if any hooks needed it; those hooks were hard deprecated
and so for WMF prod the rev id was not being set.
Bug: T247143
Depends-On: Idfa345193ae99fb2f1c9a8f8d28d8d540a6e3d62
Change-Id: I519167f76a5a3c1f5410415b2721462a3dcc3ec8
Probably nobody is using these.
Also hopefully after fully migrating to abstract schema, there'd
not be any more unnecessary drifts between MySQL and Postgres tables,
obsoleting the need for compare_schema.pl
For mysql2postgres.pl, dumpBackup.php/importDump.php can be used.
Bug: T258876
Change-Id: Ief36bca6f3a387f811408f2a5e4840656dfffff2
Modules that set "es6": true in their module definition will error when
a non-ES6 client tries to load them.
To detect ES6 support, this looks for native Promise support,
RegExp.prototype.flags, and non-BMP characters in variable names. All
browsers that lack full ES6 support fail at least one of those checks.
To flag modules as requiring ES6, this adds a ! to the end of their
version string. This takes up much less space than adding another
register() parameter (which would have to be at the end). It's hacky,
but we expect this feature to be relatively temporary, until we require
ES6 for running any JS at all (probably in about a year).
For distinguishing different types of errors thrown from
sortDependencies(), use e.name. We can't subclass Error properly because
that requires ES6.
Bug: T272104
Change-Id: I45670c910ff12eb422ae54c9fcf372e45c7b2bf1
Add section to database.md outlining simple
usage of database groups and the 3 remaining
supported types.
Bug: T267077
Change-Id: I66cb2fb063f291afc94ff207ef8d9a035bfc6a86
* Add noServices option to HookContainer::run()
* Use the option for LoadExtensionSchemaUpdates
* Document service injection including the caveats we know about
Bug: T258851
Change-Id: Ie57f2a3aeeea883f392e3c83ff228d1de68c6ebf
Add the SkinLessImportPaths attribute for skin-specific LESS import
paths, which skins can use to override the mediawiki.skin.variables.less
file.
As a starting point, add the following 5 variables:
* device widths (3x)
To help phase out 'mediawiki.ui/variables'. These are
commonly used by MobileFrontend.
* @font-family-sans
Recommended by Volker. Used by multiple skins.
* @border-radius-base
Recommended by Volker as example of something that we currently
hardcode in MediaWiki core for Vector and OOUI/WikimediaUI
in 'mediawiki.widgets.datetime' but should instead be allowed
to vary by skin and OOUI theme.
Remove the hardcoded value for '@border-radius-base' in
various places in favour of importing from mediawiki.skin.
The default is a bare default of 0 (as border-radius is off
by default in the browser).
The value for Vector is restored there by I47da304667811.
The value for MonoBook is improved by I000f319ab31b.
Bug: T112747
Change-Id: Icf86c930a3b5524254bb549624737d3b9dccb032
Deprecated since 1.35, and no longer used in core, bundled, or
wmf-deployed projects.
Bug: T160813
Change-Id: Idd3166ef90d1795a0b22dc29d52de76048d0703e
Unless it's an intentional deviation, everything in v2 should also be in v1.
This copies over:
* e71e025aba: Add 'ParsoidModules' ...
* 7abd828ea3: Extension schema updates for HookContainer
* 34bff221ba: Introduce 'MessagePosterModule' extension attribute
* e97f2943f2: QUnitTestModule should support packageFiles and templates
** d50c7f5b56: Fix schemas for 'packageFiles'
** ee1f4f8ea3: Fix schemas for 'templates'
* 3f0056a252: REST API initial commit
Change-Id: I1ae6fed0261ad29ea5cb39b3511b8cde392ab612
The docs/hooks.txt file described the hook system from MediaWiki
1.34 and earlier. Its continued presence was confusing to developers,
who were not sure if they should update it. Remove the majority of
this file and direct developers to Hooks.md, which describes the
hook system implemented in 1.35. Also add a link to
https://www.mediawiki.org/wiki/Manual:Hooks to both hooks.txt and
Hooks.md.
Bug: T257804
Change-Id: I5998f179acde1a7fb1053c23305f949fa63542d9
Extension tags required value was the string value "true",
but really should be the boolean value true.
Bug: T257898
Change-Id: I6372fc55b864e898268c6df3f7cdead03b37d53f
It is called from the ContribsPager class with $this
The type is correct, but the comment is indicating a SpecialPage object
Change-Id: I83487c288e9f0325c198eaf307ca56f65ade7eee
This adds new functionality to allow non-checkbox widgets to be
used in the checkboxes row of the edit form, and adds a dropdown
widget for the watchlist-expiry field.
Bug: T248494
Change-Id: Ice5113a97b1ef97253bfa6874ea71d910a5cd8fd
All Wikimedia production extensions are no longer using this hook. The
hook is very generic and very dangerous per ticket and I would like to
close up future usages while we still can.
Bug: T60137
Change-Id: I294a420763e4c5a06a6692339efd28614a17d3c0
We intially thought we wouldn't need this and would only need
PageMoveComplete, but it turns out Flow does need it.
Bug: T250023
Bug: T255608
Change-Id: I8e7308541d2fe6d02b9dad63e1c86c89f6e7cf53
SkinTemplatePreventOtherActiveTabs and SkinTemplateTabAction hooks were
deprecated in I96af224e6a6389f5f78bbe051c45fa796cd60ec0.
This patch adds deprecation notes for them in release notes and hooks.txt
Bug: T253814
Change-Id: Ic9e04872e68e4522fbb32443044a6d5aeadbd82a
Superseded by SidebarBeforeOutput.
Note: Translate extension is using it to serve < 1.35
Bug: T253416
Change-Id: Ia038647df14727f45f01a0923277d4d084e372af
There's already a thing called magic words, and this is not it. These
things are called variables. There are many usages of this term in the
source. The term was introduced by Lee in 2002: originally
OutputPage::replaceVariables() contained only this functionality.
I introduced the term "magic word", meaning a localizable keyword.
Localizable keywords are an abstraction not limited to this use case.
"Magic variables" is a neologism, but I suppose it is permissible, since
it disambiguates. Whereas calling a variable a magic word conflates rather
than disambiguates.
Fix terminology in magicword.md and update the examples.
Change-Id: I621c888e3790a145ca9978f6b30ff1a8f685b64c
This makes the hook name consistent with GetDoubleUnderscoreIDs, and
is part of a set of related documentation changes clarifying the difference
between "magic words" (a localization infrastructure) and the various
functions which use magic words for localization, such as parser functions,
double underscore variables, magic variables, etc.
See also I621c888e3790a145ca9978f6b30ff1a8f685b64c.
Change-Id: Ie2a6df4b179a360fb7cdfb219e915bedff501d1d
BaseTemplate should not handle anything but rendering.
In order to allow replacing it with another renderer,
such as Mustache or Vue, its hooks should be moved to
the Skin class instead.
BaseTemplateAfterPortlet is soft deprecated to allow
filtering, preventing the hook from running twice.
Both BaseTemplate::getAfterPortlet and ::renderAfterPortlet
have been deprecated as well, with both now calling
Skin::getAfterPortlet after running the
BaseTemplateAfterPortlet hook.
Bug: T253797
Change-Id: I438daa79d3d97e2518e6258c3213a805bd1f30e8
Add a "silent" flag to DeprecatedHooks which causes relevant deprecation
warnings to be suppressed, but still allows call filtering to be used.
Add existing hooks that are documented as deprecated to the array.
Change-Id: Ieeb5e1840fd06d2b7979ef7827ba82bd2a35a2ba
Reinstate `ins`/`del` selectors of I5db0350bca0b8c32 and remove obsolete
'uidesign' doc page that was building on top of CSS file.
Change-Id: Id48c076e6429c0066078c691fe99f06317e14b8a
Although it's true that Parsoid doesn't (yet) support this hook, and
the $parser object referenced in the hook is likely going to be changed,
this is a hook added in 1.35 (eb6c5f70d9)
to replace use of an even worse hook. So let's keep the lesser of the
evils, at least for now.
Bug: T236809
Change-Id: I8f866c3b9f1fc51848cfe9364635112371d18e3e
Param 'bar' was renamed to more descriptive 'sidebar' in the interface. The change should be reflected here.
Change-Id: Icdb57a4f801272d408161503d330f3260291c579