X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=blobdiff_plain;f=docs%2Fhooks.txt;h=ec2cc785fdf9a218b1a73368c54fbbb92f212a9b;hb=43f46b6c92aaaee0678d6516e799aa8717efda42;hp=fc298584a08dcc1a0f371f222705fa34c0094f37;hpb=088a8bd2b4767e90bd6136bb07ec31cb982c81ca;p=lhc%2Fweb%2Fwiklou.git diff --git a/docs/hooks.txt b/docs/hooks.txt index fc298584a0..ec2cc785fd 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -402,36 +402,39 @@ an action=query submodule. Use this to extend core API modules. &$module: Module object &$resultPageSet: ApiPageSet object -'APIQueryInfoTokens': Use this hook to add custom tokens to prop=info. Every -token has an action, which will be used in the intoken parameter and in the -output (actiontoken="..."), and a callback function which should return the -token, or false if the user isn't allowed to obtain it. The prototype of the -callback function is func($pageid, $title), where $pageid is the page ID of the -page the token is requested for and $title is the associated Title object. In -the hook, just add your callback to the $tokenFunctions array and return true -(returning false makes no sense). +'APIQueryInfoTokens': DEPRECATED! Use ApiQueryTokensRegisterTypes instead. +Use this hook to add custom tokens to prop=info. Every token has an action, +which will be used in the intoken parameter and in the output +(actiontoken="..."), and a callback function which should return the token, or +false if the user isn't allowed to obtain it. The prototype of the callback +function is func($pageid, $title), where $pageid is the page ID of the page the +token is requested for and $title is the associated Title object. In the hook, +just add your callback to the $tokenFunctions array and return true (returning +false makes no sense). $tokenFunctions: array(action => callback) -'APIQueryRevisionsTokens': Use this hook to add custom tokens to prop=revisions. -Every token has an action, which will be used in the rvtoken parameter and in -the output (actiontoken="..."), and a callback function which should return the -token, or false if the user isn't allowed to obtain it. The prototype of the -callback function is func($pageid, $title, $rev), where $pageid is the page ID -of the page associated to the revision the token is requested for, $title the +'APIQueryRevisionsTokens': DEPRECATED! Use ApiQueryTokensRegisterTypes instead. +Use this hook to add custom tokens to prop=revisions. Every token has an +action, which will be used in the rvtoken parameter and in the output +(actiontoken="..."), and a callback function which should return the token, or +false if the user isn't allowed to obtain it. The prototype of the callback +function is func($pageid, $title, $rev), where $pageid is the page ID of the +page associated to the revision the token is requested for, $title the associated Title object and $rev the associated Revision object. In the hook, just add your callback to the $tokenFunctions array and return true (returning false makes no sense). $tokenFunctions: array(action => callback) -'APIQueryRecentChangesTokens': Use this hook to add custom tokens to -list=recentchanges. Every token has an action, which will be used in the rctoken -parameter and in the output (actiontoken="..."), and a callback function which -should return the token, or false if the user isn't allowed to obtain it. The -prototype of the callback function is func($pageid, $title, $rc), where $pageid -is the page ID of the page associated to the revision the token is requested -for, $title the associated Title object and $rc the associated RecentChange -object. In the hook, just add your callback to the $tokenFunctions array and -return true (returning false makes no sense). +'APIQueryRecentChangesTokens': DEPRECATED! Use ApiQueryTokensRegisterTypes instead. +Use this hook to add custom tokens to list=recentchanges. Every token has an +action, which will be used in the rctoken parameter and in the output +(actiontoken="..."), and a callback function which should return the token, or +false if the user isn't allowed to obtain it. The prototype of the callback +function is func($pageid, $title, $rc), where $pageid is the page ID of the +page associated to the revision the token is requested for, $title the +associated Title object and $rc the associated RecentChange object. In the +hook, just add your callback to the $tokenFunctions array and return true +(returning false makes no sense). $tokenFunctions: array(action => callback) 'APIQuerySiteInfoGeneralInfo': Use this hook to add extra information to the @@ -443,13 +446,19 @@ $module: the current ApiQuerySiteInfo module sites statistics information. &$results: array of results, add things here -'APIQueryUsersTokens': Use this hook to add custom token to list=users. Every -token has an action, which will be used in the ustoken parameter and in the -output (actiontoken="..."), and a callback function which should return the -token, or false if the user isn't allowed to obtain it. The prototype of the -callback function is func($user) where $user is the User object. In the hook, -just add your callback to the $tokenFunctions array and return true (returning -false makes no sense). +'ApiQueryTokensRegisterTypes': Use this hook to add additional token types to +action=query&meta=tokens. Note that most modules will probably be able to use +the 'csrf' token instead of creating their own token types. +&$salts: array( type => salt to pass to User::getEditToken() ) + +'APIQueryUsersTokens': DEPRECATED! Use ApiQueryTokensRegisterTypes instead. +Use this hook to add custom token to list=users. Every token has an action, +which will be used in the ustoken parameter and in the output +(actiontoken="..."), and a callback function which should return the token, or +false if the user isn't allowed to obtain it. The prototype of the callback +function is func($user) where $user is the User object. In the hook, just add +your callback to the $tokenFunctions array and return true (returning false +makes no sense). $tokenFunctions: array(action => callback) 'ApiMain::onException': Called by ApiMain::executeActionWithErrorHandling() when @@ -463,8 +472,8 @@ key for the array that represents the service data. In this data array, the key-value-pair identified by the apiLink key is required. &$apis: array of services -'ApiTokensGetTokenTypes': Use this hook to extend action=tokens with new token -types. +'ApiTokensGetTokenTypes': DEPRECATED! Use ApiQueryTokensRegisterTypes instead. +Use this hook to extend action=tokens with new token types. &$tokenTypes: supported token types in format 'type' => callback function used to retrieve this type of tokens. @@ -854,6 +863,14 @@ $name: name of the special page, e.g. 'Watchlist' &$join_conds: join conditions for the tables $opts: FormOptions for this request +'LoginUserMigrated': Called during login to allow extensions the opportunity to +inform a user that their username doesn't exist for a specific reason, instead +of letting the login form give the generic error message that the account does +not exist. For example, when the account has been renamed or deleted. +$user: the User object being authenticated against. +&$msg: the message identifier for abort reason, or an array to pass a message + key and parameters. + 'Collation::factory': Called if $wgCategoryCollation is an unknown collation. $collationName: Name of the collation in question &$collationObject: Null. Replace with a subclass of the Collation class that @@ -1626,6 +1643,13 @@ $code: language code &$alldata: The localisation data from core and extensions &purgeBlobs: whether to purge/update the message blobs via MessageBlobStore::clear() +'LocalisationCacheRecacheFallback': Called for each language when merging +fallback data into the cache. +$cache: The LocalisationCache object +$code: language code +&$alldata: The localisation data from core and extensions. Note some keys may + be omitted if they won't be merged into the final result. + 'LocalisationChecksBlacklist': When fetching the blacklist of localisation checks. &$blacklist: array of checks to blacklist. See the bottom of @@ -1773,13 +1797,6 @@ $db: The database object to be queried. &$opts: Options for the query. &$join_conds: Join conditions for the query. -'MonoBookTemplateToolboxEnd': DEPRECATED. Called by Monobook skin after toolbox -links have been rendered (useful for adding more). Note: this is only run for -the Monobook skin. To add items to the toolbox you should use the -SkinTemplateToolboxEnd hook instead, which works for all "SkinTemplate"-type -skins. -$tools: array of tools - 'BaseTemplateToolbox': Called by BaseTemplate when building the $toolbox array and returning it for the skin to output. You can add items to the toolbox while still letting the skin make final decisions on skin-specific markup conventions @@ -2290,6 +2307,11 @@ $type: 'normal' or 'history' for old/diff views the MediaWiki icon but plain text instead. $skin: Skin object +'SkinPreloadExistence': Supply titles that should be added to link existence +cache before the page is rendered. +&$titles: Array of Title objects +$skin: Skin object + 'SkinSubPageSubtitle': At the beginning of Skin::subPageSubtitle(). &$subpages: Subpage links HTML $skin: Skin object @@ -2511,16 +2533,11 @@ $specialSearch: SpecialSearch object ($this) $output: $wgOut $term: Search term specified by the user -'SpecialSearchResults': Called before search result display when there are -matches. +'SpecialSearchResults': Called before search result display $term: string of search term &$titleMatches: empty or SearchResultSet object &$textMatches: empty or SearchResultSet object -'SpecialSearchNoResults': Called before search result display when there are no -matches. -$term: string of search term - 'SpecialStatsAddExtra': Add extra statistic at the end of Special:Statistics. &$extraStats: Array to save the new stats ( $extraStats[''] => ; ) @@ -2945,12 +2962,18 @@ $page: WikiPage object to be watched $user: user that watched $page: WikiPage object watched +'WatchlistEditorBeforeFormRender': Before building the Special:EditWatchlist +form, used to manipulate the list of pages or preload data based on that list. +&$watchlistInfo: array of watchlisted pages in + [namespaceId => ['title1' => 1, 'title2' => 1]] format + 'WatchlistEditorBuildRemoveLine': when building remove lines in Special:Watchlist/edit. &$tools: array of extra links $title: Title object $redirect: whether the page is a redirect $skin: Skin object +&$link: HTML link to title 'WebRequestPathInfoRouter': While building the PathRouter to parse the REQUEST_URI.