| Index: trunk/phase3/docs/hooks.txt |
| — | — | @@ -387,7 +387,7 @@ |
| 388 | 388 | 'ApiRsdServiceApis': Add or remove APIs from the RSD services list. |
| 389 | 389 | Each service should have its own entry in the $apis array and have a |
| 390 | 390 | unique name, passed as key for the array that represents the service data. |
| 391 | | -In this data array, the key-value-pair identified by the apiLink key is |
| | 391 | +In this data array, the key-value-pair identified by the apiLink key is |
| 392 | 392 | required. |
| 393 | 393 | &$apis: array of services |
| 394 | 394 | |
| — | — | @@ -613,15 +613,15 @@ |
| 614 | 614 | &$parser: Parser object |
| 615 | 615 | &$ig: ImageGallery object |
| 616 | 616 | |
| 617 | | -'BeforeWelcomeCreation': before the welcomecreation message is displayed to a newly created user |
| | 617 | +'BeforeWelcomeCreation': before the welcomecreation message is displayed to a newly created user |
| 618 | 618 | &$welcome_creation_msg: MediaWiki message name to display on the welcome screen to a newly created user account |
| 619 | | -&$injected_html: Any HTML to inject after the "logged in" message of a newly created user account |
| | 619 | +&$injected_html: Any HTML to inject after the "logged in" message of a newly created user account |
| 620 | 620 | |
| 621 | | -'BitmapHandlerTransform': before a file is transformed, gives extension the |
| | 621 | +'BitmapHandlerTransform': before a file is transformed, gives extension the |
| 622 | 622 | possibility to transform it themselves |
| 623 | | -$handler: BitmapHandler |
| | 623 | +$handler: BitmapHandler |
| 624 | 624 | $image: File |
| 625 | | -&$scalerParams: Array with scaler parameters |
| | 625 | +&$scalerParams: Array with scaler parameters |
| 626 | 626 | &$mto: null, set to a MediaTransformOutput |
| 627 | 627 | |
| 628 | 628 | 'BitmapHandlerCheckImageArea': by BitmapHandler::normaliseParams, after all normalizations have been performed, except for the $wgMaxImageArea check |
| — | — | @@ -647,7 +647,7 @@ |
| 648 | 648 | |
| 649 | 649 | 'CanonicalNamespaces': For extensions adding their own namespaces or altering the defaults |
| 650 | 650 | &$namespaces: Array of namespace numbers with corresponding canonical names |
| 651 | | - |
| | 651 | + |
| 652 | 652 | 'CategoryPageView': before viewing a categorypage in CategoryPage::view |
| 653 | 653 | $catpage: CategoryPage instance |
| 654 | 654 | |
| — | — | @@ -753,7 +753,7 @@ |
| 754 | 754 | |
| 755 | 755 | 'EditPage::importFormData': allow extensions to read additional data |
| 756 | 756 | posted in the form |
| 757 | | -$editpage: EditPage instance |
| | 757 | +$editpage: EditPage instance |
| 758 | 758 | $request: Webrequest |
| 759 | 759 | return value is ignored (should always return true) |
| 760 | 760 | |
| — | — | @@ -959,7 +959,7 @@ |
| 960 | 960 | that need to have versioned metadata should add an element to the end of |
| 961 | 961 | the version array of the form 'handler_name=version'. Most media handlers |
| 962 | 962 | won't need to do this unless they broke backwards compatibility with a |
| 963 | | - previous version of the media handler metadata output. |
| | 963 | + previous version of the media handler metadata output. |
| 964 | 964 | &$version: Array of version strings |
| 965 | 965 | |
| 966 | 966 | 'GetPreferences': modify user preferences |
| — | — | @@ -1000,7 +1000,7 @@ |
| 1001 | 1001 | $imagePage: ImagePage object ($this) |
| 1002 | 1002 | $output: $wgOut |
| 1003 | 1003 | |
| 1004 | | -'ImagePageAfterImageLinks': called after the image links section on an image |
| | 1004 | +'ImagePageAfterImageLinks': called after the image links section on an image |
| 1005 | 1005 | page is built |
| 1006 | 1006 | $imagePage: ImagePage object ($this) |
| 1007 | 1007 | &$html: HTML for the hook to add |
| — | — | @@ -1066,7 +1066,7 @@ |
| 1067 | 1067 | 'InterwikiLoadPrefix': When resolving if a given prefix is an interwiki or not. |
| 1068 | 1068 | Return true without providing an interwiki to continue interwiki search. |
| 1069 | 1069 | $prefix: interwiki prefix we are looking for. |
| 1070 | | -&$iwData: output array describing the interwiki with keys iw_url, iw_local, |
| | 1070 | +&$iwData: output array describing the interwiki with keys iw_url, iw_local, |
| 1071 | 1071 | iw_trans and optionally iw_api and iw_wikiid. |
| 1072 | 1072 | |
| 1073 | 1073 | 'InternalParseBeforeLinks': during Parser's internalParse method before links |
| — | — | @@ -1101,12 +1101,12 @@ |
| 1102 | 1102 | $user: User the password is being validated for |
| 1103 | 1103 | |
| 1104 | 1104 | 'LanguageGetNamespaces': Provide custom ordering for namespaces or |
| 1105 | | -remove namespaces. Do not use this hook to add namespaces. Use |
| | 1105 | +remove namespaces. Do not use this hook to add namespaces. Use |
| 1106 | 1106 | CanonicalNamespaces for that. |
| 1107 | 1107 | &$namespaces: Array of namespaces indexed by their numbers |
| 1108 | 1108 | |
| 1109 | | -'LanguageGetMagic': DEPRECATED, use $magicWords in a file listed in |
| 1110 | | -$wgExtensionMessagesFiles instead. |
| | 1109 | +'LanguageGetMagic': DEPRECATED, use $magicWords in a file listed in |
| | 1110 | +$wgExtensionMessagesFiles instead. |
| 1111 | 1111 | Use this to define synonyms of magic words depending of the language |
| 1112 | 1112 | $magicExtensions: associative array of magic words synonyms |
| 1113 | 1113 | $lang: laguage code (string) |
| — | — | @@ -1239,7 +1239,7 @@ |
| 1240 | 1240 | $refreshLinks: RefreshLinks object |
| 1241 | 1241 | |
| 1242 | 1242 | 'MagicWordMagicWords': When defining new magic word. |
| 1243 | | -DEPRECATED: use $magicWords in a file listed in |
| | 1243 | +DEPRECATED: use $magicWords in a file listed in |
| 1244 | 1244 | $wgExtensionMessagesFiles instead. |
| 1245 | 1245 | $magicWords: array of strings |
| 1246 | 1246 | |
| — | — | @@ -1296,8 +1296,8 @@ |
| 1297 | 1297 | 'MonoBookTemplateToolboxEnd': Called by Monobook skin after toolbox links have |
| 1298 | 1298 | been rendered (useful for adding more) |
| 1299 | 1299 | Note: this is only run for the Monobook skin. This hook is deprecated and |
| 1300 | | -may be removed in the future. To add items to the toolbox you should use |
| 1301 | | -the SkinTemplateToolboxEnd hook instead, which works for all |
| | 1300 | +may be removed in the future. To add items to the toolbox you should use |
| | 1301 | +the SkinTemplateToolboxEnd hook instead, which works for all |
| 1302 | 1302 | "SkinTemplate"-type skins. |
| 1303 | 1303 | $tools: array of tools |
| 1304 | 1304 | |
| — | — | @@ -1542,8 +1542,8 @@ |
| 1543 | 1543 | |
| 1544 | 1544 | 'ResourceLoaderGetStartupModules': Run once the startup module is being generated. This allows you |
| 1545 | 1545 | to add modules to the startup module. This hook should be used sparingly since any module added here |
| 1546 | | -will be loaded on all pages. This hook is useful if you want to make code available to module loader |
| 1547 | | -scripts. |
| | 1546 | +will be loaded on all pages. This hook is useful if you want to make code available to module loader |
| | 1547 | +scripts. |
| 1548 | 1548 | |
| 1549 | 1549 | 'ResourceLoaderRegisterModules': Right before modules information is required, such as when responding to a resource |
| 1550 | 1550 | loader request or generating HTML output. |
| — | — | @@ -1577,7 +1577,7 @@ |
| 1578 | 1578 | &$title : Current Title object that is being returned (null if none found). |
| 1579 | 1579 | |
| 1580 | 1580 | 'SearchEngineReplacePrefixesComplete': Run after SearchEngine::replacePrefixes(). |
| 1581 | | -$searchEngine : The SearchEngine object. Users of this hooks will be interested |
| | 1581 | +$searchEngine : The SearchEngine object. Users of this hooks will be interested |
| 1582 | 1582 | in the $searchEngine->namespaces array. |
| 1583 | 1583 | $query : Original query. |
| 1584 | 1584 | &$parsed : Resultant query with the prefixes stripped. |
| — | — | @@ -1635,7 +1635,7 @@ |
| 1636 | 1636 | $type: 'normal' or 'history' for old/diff views |
| 1637 | 1637 | &$msg: overridable message; usually 'copyright' or 'history_copyright'. This message must be in HTML format, not wikitext! |
| 1638 | 1638 | &$link: overridable HTML link to be passed into the message as $1 |
| 1639 | | -&$forContent: overridable flag if copyright footer is shown in content language. |
| | 1639 | +&$forContent: overridable flag if copyright footer is shown in content language. |
| 1640 | 1640 | |
| 1641 | 1641 | 'SkinGetPoweredBy' |
| 1642 | 1642 | &$text: additional 'powered by' icons in HTML. |
| — | — | @@ -1758,9 +1758,9 @@ |
| 1759 | 1759 | 'SpecialRandomGetRandomTitle': called during the execution of Special:Random, |
| 1760 | 1760 | use this to change some selection criteria or substitute a different title |
| 1761 | 1761 | &$randstr: The random number from wfRandom() |
| 1762 | | -&$isRedir: Boolean, whether to select a redirect or non-redirect |
| | 1762 | +&$isRedir: Boolean, whether to select a redirect or non-redirect |
| 1763 | 1763 | &$namespaces: An array of namespace indexes to get the title from |
| 1764 | | -&$extra: An array of extra SQL statements |
| | 1764 | +&$extra: An array of extra SQL statements |
| 1765 | 1765 | &$title: If the hook returns false, a Title object to use instead of the |
| 1766 | 1766 | result from the normal query |
| 1767 | 1767 | |
| — | — | @@ -1828,10 +1828,10 @@ |
| 1829 | 1829 | $term: string of search term |
| 1830 | 1830 | |
| 1831 | 1831 | 'SpecialStatsAddExtra': add extra statistic at the end of Special:Statistics |
| 1832 | | -&$extraStats: Array to save the new stats |
| | 1832 | +&$extraStats: Array to save the new stats |
| 1833 | 1833 | ( $extraStats['<name of statistic>'] => <value>; ) |
| 1834 | 1834 | |
| 1835 | | -'SpecialUploadComplete': Called after successfully uploading a file from |
| | 1835 | +'SpecialUploadComplete': Called after successfully uploading a file from |
| 1836 | 1836 | Special:Upload |
| 1837 | 1837 | $form: The SpecialUpload object |
| 1838 | 1838 | |
| — | — | @@ -1938,7 +1938,7 @@ |
| 1939 | 1939 | Lets you poke at member variables like $mUploadDescription before the |
| 1940 | 1940 | file is saved. |
| 1941 | 1941 | Do not use this hook to break upload processing. This will return the user to |
| 1942 | | -a blank form with no error message; use UploadVerification and |
| | 1942 | +a blank form with no error message; use UploadVerification and |
| 1943 | 1943 | UploadVerifyFile instead |
| 1944 | 1944 | |
| 1945 | 1945 | 'UploadCreateFromRequest': when UploadBase::createFromRequest has been called |
| — | — | @@ -1948,19 +1948,19 @@ |
| 1949 | 1949 | 'UploadComplete': when Upload completes an upload |
| 1950 | 1950 | &$upload: an UploadBase child instance |
| 1951 | 1951 | |
| 1952 | | -'UploadFormInitDescriptor': after the descriptor for the upload form as been |
| | 1952 | +'UploadFormInitDescriptor': after the descriptor for the upload form as been |
| 1953 | 1953 | assembled |
| 1954 | 1954 | $descriptor: (array) the HTMLForm descriptor |
| 1955 | 1955 | |
| 1956 | | -'UploadFormSourceDescriptors': after the standard source inputs have been |
| | 1956 | +'UploadFormSourceDescriptors': after the standard source inputs have been |
| 1957 | 1957 | added to the descriptor |
| 1958 | 1958 | $descriptor: (array) the HTMLForm descriptor |
| 1959 | 1959 | |
| 1960 | | -'UploadVerification': additional chances to reject an uploaded file. Consider |
| | 1960 | +'UploadVerification': additional chances to reject an uploaded file. Consider |
| 1961 | 1961 | using UploadVerifyFile instead. |
| 1962 | 1962 | string $saveName: destination file name |
| 1963 | 1963 | string $tempName: filesystem path to the temporary file for checks |
| 1964 | | -string &$error: output: message key for message to show if upload canceled |
| | 1964 | +string &$error: output: message key for message to show if upload canceled |
| 1965 | 1965 | by returning false. May also be an array, where the first element |
| 1966 | 1966 | is the message key and the remaining elements are used as parameters to |
| 1967 | 1967 | the message. |
| — | — | @@ -1968,7 +1968,7 @@ |
| 1969 | 1969 | 'UploadVerifyFile': extra file verification, based on mime type, etc. Preferred |
| 1970 | 1970 | in most cases over UploadVerification. |
| 1971 | 1971 | object $upload: an instance of UploadBase, with all info about the upload |
| 1972 | | -string $mime: the uploaded file's mime type, as detected by MediaWiki. Handlers |
| | 1972 | +string $mime: the uploaded file's mime type, as detected by MediaWiki. Handlers |
| 1973 | 1973 | will typically only apply for specific mime types. |
| 1974 | 1974 | object &$error: output: true if the file is valid. Otherwise, an indexed array |
| 1975 | 1975 | representing the problem with the file, where the first element |
| — | — | @@ -2047,7 +2047,7 @@ |
| 2048 | 2048 | called for every call to User::getDefaultOptions(), which means it's |
| 2049 | 2049 | potentially called dozens or hundreds of times. You may want to cache |
| 2050 | 2050 | the results of non-trivial operations in your hook function for this reason. |
| 2051 | | -&$defaultOptions: Array of preference keys and their default values. |
| | 2051 | +&$defaultOptions: Array of preference keys and their default values. |
| 2052 | 2052 | |
| 2053 | 2053 | 'UserGetEmail': called when getting an user email address |
| 2054 | 2054 | $user: User object |
| — | — | @@ -2161,6 +2161,11 @@ |
| 2162 | 2162 | &$timestamp: new timestamp, change this to override local email |
| 2163 | 2163 | authentification timestamp |
| 2164 | 2164 | |
| | 2165 | +'UserToolLinksEdit': Called when generating a list user tool links |
| | 2166 | +$userId: User id of the current user |
| | 2167 | +$userText: User name of the current user |
| | 2168 | +&$items: Array of user tool links |
| | 2169 | + |
| 2165 | 2170 | 'WantedPages::getQueryInfo': called in WantedPagesPage::getQueryInfo(), can be |
| 2166 | 2171 | used to alter the SQL query which gets the list of wanted pages |
| 2167 | 2172 | &$wantedPages: WantedPagesPage object |
| Index: trunk/phase3/includes/Linker.php |
| — | — | @@ -969,6 +969,8 @@ |
| 970 | 970 | $items[] = self::emailLink( $userId, $userText ); |
| 971 | 971 | } |
| 972 | 972 | |
| | 973 | + wfRunHooks( 'UserToolLinksEdit', array( $userId, $userText, &$items ) ); |
| | 974 | + |
| 973 | 975 | if ( $items ) { |
| 974 | 976 | return ' <span class="mw-usertoollinks">(' . $wgLang->pipeList( $items ) . ')</span>'; |
| 975 | 977 | } else { |