Commit graph

14 commits

Author SHA1 Message Date
gerritbot 04aaa7a601 Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I9497c2d1bbacd1a939d1734ef5b3fcdf55d49528
2023-08-19 04:16:50 +00:00
Bartosz Dziewoński 9f823d72a8 Handle 'prefix' when 'action=edit', even if another extension overrides action
Bug: T337436
Change-Id: Idbd248ac9731fe2082e1557dfddbf39a112ceac7
2023-05-25 00:00:49 +02:00
Umherirrender b197b9ffe7 Improve Hooks::onMediaWikiPerformAction
- Use IContextSource::getActionName directly and not
MediaWiki::getAction
- Use IContextSource::getConfig instead of MainConfig
- Use getRawVal to check against constant value
- Use local var to avoid repeatly calls

Change-Id: I592e4451035c37c35fe181fa69b080f3f7a31ec8
2022-11-11 11:58:02 +01:00
C. Scott Ananian b808f7f559 Make InputBoxHooks::render() non-static
This matches modern practice a little better: the InputBoxHooks class
can (eventually) contain the service objects needed by this extension
and make them available to the hooks.   It also avoids the need to
explicitly name this class and its namespace.

Followup-To: Iaaff18b50619f490a4437be7f4d95845c8e0eedb
Change-Id: I07a574eca2d0012e3f7e6172d75cffd34392b1b4
2021-12-10 13:49:55 -05:00
Isabelle Hurbain-Palatin cbead9bfbb Introducing a namespace for InputBox
This is a pre-patch for I5144fd6c54 to add a namespace for InputBox and
making sure that this still works, independently of what we're doing
later.

Change-Id: Iaaff18b50619f490a4437be7f4d95845c8e0eedb
2021-12-10 19:15:56 +01:00
Fomafix 2e375a712d Use HookHandlers to inject services and replace global variables
This change requires MediaWiki 1.35+ which is already required in
extension.json.

Change-Id: Ieb636c9e96c534ed6dccd8cce5308fed160c3410
2021-11-12 16:41:59 +00:00
Umherirrender 1abc7abc43 Remove unneeded return from hook handlers
Change-Id: Ib38375909ee09e3d5342b6fd16194feeffbb8124
2021-11-04 18:50:42 +00:00
Umherirrender 4829d17708 build: Remove unneeded phan suppression
Change-Id: Iafff45a2693e201cbb81c59a6453f6bbea709f7a
2021-11-04 19:50:25 +01:00
Fomafix b1e2979b48 Update PHP coding style
* Use ' instead of ".
* Use === and !== instead of == and !=.

Change-Id: Ie4e405d4fd739d4af34010da3687d8a75d846a73
2021-10-16 20:10:22 +00:00
libraryupgrader b636ed5093 build: Updating composer dependencies
* mediawiki/mediawiki-phan-config: 0.10.6 → 0.11.0
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

Change-Id: I6d629585dfc24c34f6a0fc3760d354aba2e1f5b3
2021-09-09 10:58:03 +00:00
Bartosz Dziewoński 943d505e2e Fix "PHP Notice: Array to string conversion" when handling prefix/title params
$params['title'] can be an array if someone has messed with the query
parameters.

Use WebRequest::getText(), which guarantees strings (and which is
already used for 'prefix' earlier in this method).

Change-Id: I7b974067fdee22fc42c07fad98af4619fa850269
2021-02-19 21:28:55 +01:00
Max Semenik ff039d713e Stop passing objects by reference
Bug: T193950
Change-Id: I1695035499c6e6a612cbf2ed8090bbe7bb04bfea
2019-11-14 23:34:06 -08:00
Kunal Mehta 6deecac4c2 Add phan configuration
Change-Id: I220a6da9d506a754d4e502bd4bd3178949b73f5f
2018-02-24 13:57:36 -08:00
Kunal Mehta 431f955a81 Move classes to includes/
Change-Id: Ia65adfc9d9d6a117d8d4fc711e97414328b42440
2018-02-24 13:57:32 -08:00
Renamed from InputBox.hooks.php (Browse further)