Commit graph

1795 commits

Author SHA1 Message Date
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
C. Scott Ananian
e71e025aba Add 'ParsoidModules' as a top-level core attribute in extension.json
See also I20f641a1ff032a6da3549b01dfaf8f4cf1eb5071, which uses this
attribute, and the earlier discussion in the (abandoned)
Ia251d631febf5be7fcad21cd8b73a68ec2785137.

Bug: T133320
Change-Id: I6c74938883376ec17f3790678b435585083a440f
2020-05-22 18:19:00 +00:00
MarcoAurelio
dbfebbbcec Fix typo 'desciption'
Should be 'description'.

Bug: T201491
Change-Id: Ic6d7efb8da2fb1c9645ca4c4e666d10953b8a4ab
2020-05-21 18:42:35 +00:00
Tim Starling
7abd828ea3 Extension schema updates for HookContainer
* Updated the extension schema for the new hook system
* Fixed the lack of "services" from RestRoutes ObjectFactory specs,
  since RestRoutes and HookHandlers is supposed to be the same.

Bug: T240307
Change-Id: I1a8657ff9fd14618c6709dbab62c3b4ee9f659a5
2020-05-18 14:18:35 +10:00
jenkins-bot
1eaf12a4d6 Merge "Update PostgreSQL supported version in docs/database/postgres.txt" 2020-05-17 16:32:51 +00:00
Reedy
39176163d2 Update PostgreSQL supported version in docs/database/postgres.txt
Change-Id: I9e49857e67f3351683dbbf0019d8301eaf43e59c
2020-05-17 15:43:46 +01:00
Reedy
71c3aaf7f7 Remove rotten docs/php-memcached docs
README contains a URL that doesn't work.

ChangeLog has no purpose these days

Documentation doesn't match state of the class these days either

Change-Id: Ia2e00891d78cb4b227113e89d6b5e95a10261f0a
2020-05-17 15:42:17 +01:00
jenkins-bot
b7968e948d Merge "Sync descriptions from extension.schema.v2.json to v1.json" 2020-05-16 02:44:20 +00:00
Reedy
0b91ceedec Sync descriptions from extension.schema.v2.json to v1.json
Change-Id: I2acb39f4544e2608596f8e76e10ddc516309edec
2020-05-16 03:06:19 +01:00
Reedy
1b1a17bcef skins: Allow $wgValidSkinNames to take ObjectFactory spec
Bug: T252760
Change-Id: I189de448c3b2c56dfe6bf49170d7746943cf2417
2020-05-16 01:57:25 +00:00
jenkins-bot
6ca9c1f252 Merge "Replace NewRevisionFromEditComplete with RevisionFromEditComplete" 2020-05-14 00:22:57 +00:00