From: jenkins-bot Date: Wed, 9 Jul 2014 17:47:44 +0000 (+0000) Subject: Merge "Allow third party code to hook-up MIME type detection" X-Git-Tag: 1.31.0-rc.0~15028 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=a79442d6cf747e578575f80238f13dd0ee589bc2;hp=-c;p=lhc%2Fweb%2Fwiklou.git Merge "Allow third party code to hook-up MIME type detection" --- a79442d6cf747e578575f80238f13dd0ee589bc2 diff --combined docs/hooks.txt index eb4d4359f9,7cbb5d1855..ab23bc0073 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@@ -1712,8 -1712,8 +1712,8 @@@ $refreshLinks: RefreshLinks objec 'MagicWordwgVariableIDs': When defining new magic words IDs. $variableIDs: array of strings -'MakeGlobalVariablesScript': Called right before Skin::makeVariablesScript is -executed. Ideally, this hook should only be used to add variables that depend on +'MakeGlobalVariablesScript': Called at end of OutputPage::getJSVars. +Ideally, this hook should only be used to add variables that depend on the current page/request; static configuration should be added through ResourceLoaderGetConfigVars instead. &$vars: variable (or multiple variables) to be added into the output of @@@ -1757,6 -1757,30 +1757,30 @@@ caches $title: name of the page changed. $text: new contents of the page. + 'MimeMagicInit': Before processing the list mapping MIME types to media types + and the list mapping MIME types to file extensions. + As an extension author, you are encouraged to submit patches to MediaWiki's + core to add new MIME types to mime.types. + $mimeMagic: Instance of MimeMagic. + Use $mimeMagic->addExtraInfo( $stringOfInfo ); + for adding new MIME info to the list. + Use $mimeMagic->addExtraTypes( $stringOfTypes ); + for adding new MIME types to the list. + + 'MimeMagicImproveFromExtension': Allows MW extensions to further improve the + MIME type detected by considering the file extension. + $mimeMagic: Instance of MimeMagic. + $ext: File extension. + &$mime: MIME type (in/out). + + 'MimeMagicGuessFromContent': Allows MW extensions guess the MIME by content. + $mimeMagic: Instance of MimeMagic. + &$head: First 1024 bytes of the file in a string (in - Do not alter!). + &$tail: More or equal than last 65558 bytes of the file in a string + (in - Do not alter!). + $file: File path. + &$mime: MIME type (out). + 'ModifyExportQuery': Modify the query used by the exporter. $db: The database object to be queried. &$tables: Tables in the query.