Commit graph

1805 commits

Author SHA1 Message Date
jenkins-bot
5ebb7dd4d0 Merge "Add db group documentation" 2020-12-09 23:41:21 +00:00
Nikki Nikkhoui
3067ec77c2 Add db group documentation
Add section to database.md outlining simple
usage of database groups and the 3 remaining
supported types.

Bug: T267077
Change-Id: I66cb2fb063f291afc94ff207ef8d9a035bfc6a86
2020-12-09 23:10:48 +00:00
C. Scott Ananian
8510f728b1 docs: Fix JSON for deprecation in Hooks doc
A quoted string here will fail validation in ExtensionJsonValidationTest.

Change-Id: I8d8bbb03f4238090cab13218d45123e885744c9b
2020-12-09 15:03:49 -05:00
DannyS712
6a03737104 Update for object-factory v.3
Bug: T267074
Change-Id: Iff9b46c9e78e87d32c8f75d26b284ce01bccb63d
2020-11-17 06:20:23 +00:00
Tim Starling
9834d4c214 Prevent service injection to LoadExtensionSchemaUpdates hook
* 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
2020-09-18 08:01:52 +10:00
Timo Tijhof
0c01d8cc52 resourceloader: Add skin-based 'mediawiki.skin.variables.less' import
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
2020-09-15 10:05:53 +00:00
Timo Tijhof
10bdad0d35 Remove $wgMemc
Deprecated since 1.35, and no longer used in core, bundled, or
wmf-deployed projects.

Bug: T160813
Change-Id: Idd3166ef90d1795a0b22dc29d52de76048d0703e
2020-07-27 23:45:22 +00:00
Kunal Mehta
46d4504660 registration: Sync v2 and v1 schemas
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
2020-07-20 16:31:45 -07:00
jenkins-bot
ba6a7bfacb Merge "Update the hooks documentation included with MediaWiki." 2020-07-16 21:59:32 +00:00
Kosta Harlan
3e52a04c99 Clarify hook definition in extension.json
Change-Id: I7bbdde9d476dc98b8e99fa38cd5d54903341bd21
2020-07-16 19:13:56 +02:00
Bill Pirkle
56660af3db Update the hooks documentation included with MediaWiki.
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
2020-07-16 09:02:05 -05:00
jenkins-bot
6c90c2758b Merge "registration: Restrict properties in "config" in manifest_version 2" 2020-07-14 09:40:15 +00:00
kalle
3177547540 registration: Fix string "true" in extension v2 schema
Extension tags required value was the string value "true",
but really should be the boolean value true.

Bug: T257898
Change-Id: I6372fc55b864e898268c6df3f7cdead03b37d53f
2020-07-14 08:50:03 +00:00
Umherirrender
ae7429f878 Adjust documentation of ContributionsLineEndingHook
It is called from the ContribsPager class with $this
The type is correct, but the comment is indicating a SpecialPage object

Change-Id: I83487c288e9f0325c198eaf307ca56f65ade7eee
2020-07-12 11:20:21 +02:00
Sam Wilson
4fa7d4d7a7 Add watchlist expiry to edit form
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
2020-06-30 10:22:04 +08:00
jdlrobson
5e9604f429 Deprecate SkinTemplateOutputPageBeforeExec hook
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
2020-06-29 15:19:55 -07:00
Roan Kattouw
c8b9d849fc Add PageMoveCompleting hook, to replace TitleMoveCompleting
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
2020-06-16 22:27:28 -07:00
Ammar Abdulhamid
dec08eacdd Deprecate SkinTemplateToolboxEnd hook
Bug: T253783
Change-Id: Ia6f46c1e3d33a14d3f3161f1716f9d0791cd397d
2020-06-15 23:18:05 +00:00
Vas Jaremchuk
cea8cd4102 Add release-notes for two deprecated hooks
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
2020-06-15 13:57:48 +00:00
Ammar Abdulhamid
6ef284e37e Hard deprecate BaseTemplateToolbox hook
Superseded by SidebarBeforeOutput.

Note: Translate extension is using it to serve < 1.35

Bug: T253416
Change-Id: Ia038647df14727f45f01a0923277d4d084e372af
2020-06-13 10:03:49 +01:00
Ammar Abdulhamid
aa048974db Deprecate SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook
Bug: T254431
Change-Id: I2ad144ac7aa5b0243f070b350b7dfc61ee466743
2020-06-12 22:21:13 +01:00
jenkins-bot
a2812b8a6a Merge "Rename CoreMagicWords to CoreMagicVariables and update docs" 2020-06-12 19:18:02 +00:00
Tim Starling
a30b328bd4 Rename CoreMagicWords to CoreMagicVariables and update docs
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
2020-06-11 13:28:45 +10:00
jenkins-bot
766d9299fb Merge "Rename MagicWordwgVariableIDs hook to GetMagicVariableIDs" 2020-06-11 02:59:19 +00:00
Reedy
d019a0775f s/slave/replica
Bug: T254646
Change-Id: I8397fc890e5ca19e28c50422ba056ff42e9fe23f
2020-06-11 00:50:10 +00:00
jenkins-bot
f34d26672e Merge "Add PageSaveComplete hook to replace PageContent(Insert|Save)Complete" 2020-06-10 21:02:49 +00:00
DannyS712
0e915c0b63 Add PageSaveComplete hook to replace PageContent(Insert|Save)Complete
Bug: T250566
Change-Id: I8e515ad9d344cb31e59bcfc87a717ca2b93feee2
2020-06-10 20:41:00 +00:00
DannyS712
1594282ad0 Replace TitleMoveCompleting and TitleMoveComplete hooks
Bug: T250023
Change-Id: Iceb0aebb51769c413bf560d1c5b70a7213cb8b91
2020-06-10 20:03:31 +00:00
C. Scott Ananian
2c9d496268 Rename MagicWordwgVariableIDs hook to GetMagicVariableIDs
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
2020-06-10 12:28:20 -04:00
mainframe98
4e2897575a Replace BaseTemplateAfterPortlet with SkinAfterPortlet
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
2020-06-09 21:51:58 +00:00
jenkins-bot
90d8df020d Merge "mediawiki.diff: Reduce selectors and remove obsolete documentation HTML page" 2020-06-05 17:57:19 +00:00
jenkins-bot
9838d7bb25 Merge "Introduce soft deprecation of hooks" 2020-06-05 16:02:39 +00:00
jenkins-bot
18ec60d147 Merge "Un-deprecate the ParserPreSaveTransformComplete hook" 2020-06-04 22:03:55 +00:00
Tim Starling
d1363015b7 Introduce soft deprecation of hooks
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
2020-06-04 10:00:55 +10:00
Volker E
366768e905 mediawiki.diff: Reduce selectors and remove obsolete documentation HTML page
Reinstate `ins`/`del` selectors of I5db0350bca0b8c32 and remove obsolete
'uidesign' doc page that was building on top of CSS file.

Change-Id: Id48c076e6429c0066078c691fe99f06317e14b8a
2020-06-03 21:46:43 +00:00
jenkins-bot
3cd87b81cf Merge "Documentation for the new hook system" 2020-06-01 15:54:13 +00:00
C. Scott Ananian
13d0ad0de6 Un-deprecate the ParserPreSaveTransformComplete hook
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
2020-06-01 10:14:39 -04:00
jenkins-bot
e4fb04a5f0 Merge "Make hook parameters use consistent name as the Hook interface" 2020-05-30 10:07:48 +00:00
Ammar Abdulhamid
7c1a46ba88 Make hook parameters use consistent name as the Hook interface
Param 'bar' was renamed to more descriptive 'sidebar' in the interface. The change should be reflected here.

Change-Id: Icdb57a4f801272d408161503d330f3260291c579
2020-05-29 13:24:17 +01:00
DannyS712
0eb1de24a7 UserClearNewTalkNotification hook: Only guarantee a UserIdentity
Bug: T253435
Change-Id: Ia46b67ff284a8b9bc0d500e7b8536c2e84faef61
2020-05-29 09:40:31 +00:00
jenkins-bot
ca6ec5a4ee Merge "Add 'ParsoidModules' as a top-level core attribute in extension.json" 2020-05-29 00:16:01 +00:00
DannyS712
e55e19c630 Injection.md - document ServiceOptions/CONSTRUCTOR_OPTIONS systems
Common way of injecting multiple configuration values

Change-Id: Ie7f7febf279baf34bad8b628911285bca3a008b5
2020-05-28 22:19:59 +00:00
Tim Starling
323ac073d3 Documentation for the new hook system
Add Hooks.md with a description of the new hooks system

Bug: T240307
Change-Id: I83cbbfc52ba7645ee5f31b6bcc0cb23cd1bf1ccf
2020-05-28 00:58:11 +00:00
Petr Pchelko
82bf390ed5 Add $originalOptions parameter to UserSaveOptions hook
Since the hook interfaces are not yet released and adding a parameter
to the hook is b/c, I have just added a parameter without introducing
a new version of the hook interface

Bug: T253149
Change-Id: Iac6c4b706ddbc7b0c9fb0b40eba05bd3530b1fdf
2020-05-27 08:32:40 -07:00
jenkins-bot
b5012a1e7d Merge "[registration] Remove type of string from Hooks in extension.schema.v1.json" 2020-05-26 16:25:11 +00:00
jenkins-bot
29fbda6260 Merge "Extension schema updates for HookContainer" 2020-05-26 00:46:33 +00:00
Reedy
583602e16d [registration] Remove type of string from Hooks in extension.schema.v1.json
Same as it will be or v2 when that patch merges

Change-Id: I64c3bbcda0f353fe9c14b0d5bea241e0304c0e2e
Follows-Up: I1a8657ff9fd14618c6709dbab62c3b4ee9f659a5
2020-05-26 01:28:49 +01:00
jenkins-bot
d1e2be2b43 Merge "docs/README: Update link to php documentation on doc.wikimedia.org" 2020-05-25 09:32:16 +00:00
DannyS712
8f92469c6c docs - minor cleanup, including fixing markdown syntax
Use code highlighting where relevant
Fix list syntax in memcached.md to render lists without paragraph breaks
Add a missing period to schema.md

Change-Id: I763cfd479968cedbf952c231283d33b82a0910d6
2020-05-23 07:58:14 +00:00
DannyS712
74a7ebce44 docs/README: Update link to php documentation on doc.wikimedia.org
https://doc.wikimedia.org/mediawiki-core/master/php/html/ no longer
works, https://doc.wikimedia.org/mediawiki-core/master/php/ is where
the php documentation lies

Change-Id: I518027861ea60bcee66e6c0fb50cc4dabef714f0
2020-05-23 07:46:33 +00:00