Commit graph

16 commits

Author SHA1 Message Date
jdlrobson 9a25e19bfe Do not queue MMV modules on the mobile domain
Document the compatibility problem between MobileFrontend
and Minerva.

Note that on Minerva when running in desktop mode, the code
in this extension runs (not MobileFrontend).

Bug: T235712
Change-Id: Iafe508cbd19b3f77f553219bf4c28f04ba147fe9
2019-11-05 19:01:30 +00:00
Thiemo Kreuz f2b247cb2f Add missing type hints to hook handler functions
This patch also removes some & from function parameters that are not
meant to be passed "by reference". These & are from a time when PHP 4
passed objects by creating expensive copies. They are not needed any
more, but create the wrong impression the hook handler function would be
allowed to replace these objects with other ones.

Change-Id: If91c6d963150f909735f2c06f98a446ae1fb2047
2019-05-11 13:44:05 +02:00
Thiemo Kreuz 0fe650ce08 Add @see links pointing to the MediaWiki hooks manual
Change-Id: I1980f488f8516fe8700ffdae4905e09446b322de
2019-05-10 19:18:49 +00:00
jenkins-bot ac1cc30d8a Merge "Rename all hook handler functions to follow on<HookName> scheme" 2019-05-10 15:53:07 +00:00
Thiemo Kreuz 44457ec926 Rename all hook handler functions to follow on<HookName> scheme
Change-Id: Ic770a9dd0a708a670a8658d3be037c7b73ebea83
2019-05-10 14:26:15 +02:00
Thiemo Kreuz 7c67c4ba81 Remove all default "return true" from hook handlers
This is the default for many years now. Returning true is not different
from returning nothing.

Change-Id: If05c82d4a534d21269934aebb48786a97246ac88
2019-05-10 14:18:37 +02:00
James D. Forrester 23b2f78642 Remove the BetaFeatures integration
Not used in years. Sadly $wgMediaViewerEnableByDefault has to remain
for now.

Change-Id: If2d90627de230b9b36e7b24abe0d4bdee8a2ef35
2019-05-08 11:22:35 -07:00
Timo Tijhof c520b76978 Rename MakeGlobalVariablesScript hook for consistency
Given case-sensitive search, the callback didn't show up
when searching for "MakeGlobalVariablesScript", unlike for
almost every other deployed extension.

Change-Id: Ib9138446a898802150a123e140a14bfba08709e6
2019-04-16 22:59:25 +00:00
Ed Sanders 551a0561fe Always load MMV on Flow pages
We can't tell if there are images on the page, so just always
load. The code will likely be in the client cache anyway.

Bug: T62014
Change-Id: Idaec22c3fd7126c1818c5febbccd6a0cfac7b721
2019-03-13 21:56:02 +00:00
jenkins-bot a68bd2a10b Merge "Replace use of deprecated ResourceLoaderTestModules hook" 2019-03-05 13:06:05 +00:00
Umherirrender 0312e465ed Use ExtensionRegistry rather than class_exists
Change-Id: I99d0207aaf193ab2aa4e27c7f12a5cefc2dc4da9
2019-03-03 02:05:12 +01:00
James D. Forrester 8ec4150af0 Replace use of deprecated ResourceLoaderTestModules hook
Use the new extension.json attribute instead.

Bug: T214211
Depends-On: I27ecebe27d7aaebe6d1317bc5eaea9cca368b45d
Change-Id: Iacb68ce9a7bab864720ef9a56f8702a4f02c129d
2019-02-13 15:05:33 -08:00
Eric Gardner bbaf7a38b4 Get Rid of EmbedFileInfo
* Deletes the mmv.model.EmbedFileInfo class file and its test file
* Updates the extension.json and MultimediaViewerHooks.php files to reflect
  these deletions (by removing entries from dependency lists)
* Refactors all instances of `new mmv.model.EmbedFileInfo()` to instead use a
  POJO with appropriate properties. Conditional assignment is used for the
  caption and alt properties if there is any chance they won't be available, to
  keep from adding props with falsy values.
* Refactors JSDoc method annotations so that `@param` tags expecting an
  EmbedFileInfo instance now expect an object; relevant properties of this
  object and their types have been added to the method annotations as well.

Bug: T77320
Change-Id: Ie9f5f24136f4b73000259685474ce4d765a3ccd3
2019-02-05 15:31:49 -08:00
Kunal Mehta cdac35ffda Register EventLogging schemas in extension.json
Change-Id: I7102950ff23fe6cb7f61d5a067076ddd77b10096
2018-07-26 09:51:31 -07:00
Kunal Mehta 03eb49cde1 Remove unnecessary $wgExtensionFunctions
As best I can tell, adding the `ext.eventLogging` module as a dependency
for these three modules is unnecesary. One of those modules doesn't
even exist, and my greps across the entire extension show that
mmv.logging.Logger.js uses `mw.loader.using` to load the module, so a
server-side dependency isn't required.

As an aside, this extension should probably use the more abstract
`mw.track` interface instead.

Bug: T180192
Change-Id: If71277114be5a003d8f51040e52a601ace983c51
2018-07-25 17:02:59 -07:00
Kunal Mehta e735c9bcff Move Hooks file into includes/
Change-Id: I534501cf06832fc53a5814f1e58cce00d32d09bb
2018-04-14 01:05:33 -07:00