X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=docs%2Fhooks.txt;h=82238142b04b3b38d28ce4527b360b4d53609013;hp=219c51f30e13cf717b283ee7f47e14adc5fc58cb;hb=b7625d63a6f1f8867c911dbd6e93eebdaca3312f;hpb=7cd7c534f7c86fff63bbd372dc081816df7d65ca diff --git a/docs/hooks.txt b/docs/hooks.txt index 219c51f30e..82238142b0 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -348,6 +348,12 @@ $from: From address $subject: Subject of the email $body: Body of the message +'AncientPagesQuery': Allow extensions to modify the query used by +Special:AncientPages. +&$tables: tables to join in the query +&$conds: conditions for the query +&$joinConds: join conditions for the query + 'APIAfterExecute': After calling the execute() method of an API module. Use this to extend core API modules. &$module: Module object @@ -618,8 +624,8 @@ a chance to hide their (unrelated) log entries. AND in the final query) $logTypes: Array of log types being queried -'ArticleAfterFetchContentObject': After fetching content of an article from the -database. +'ArticleAfterFetchContentObject': DEPRECATED since 1.32, use ArticleRevisionViewCustom +to control output. After fetching content of an article from the database. &$article: the article (object) being loaded from the database &$content: the content of the article, as a Content object @@ -634,12 +640,21 @@ this to change the content in this area or how it is loaded. $diffEngine: the DifferenceEngine $output: the OutputPage object -'ArticleContentViewCustom': Allows to output the text of the article in a -different format than wikitext. Note that it is preferable to implement proper -handing for a custom data type using the ContentHandler facility. +'ArticleRevisionViewCustom': Allows custom rendering of an article's content. +Note that it is preferable to implement proper handing for a custom data type using +the ContentHandler facility. +$revision: content of the page, as a RevisionRecord object, or null if the revision + could not be loaded. May also be a fake that wraps content supplied by an extension. +$title: title of the page +$oldid: the requested revision id, or 0 for the currrent revision. +$output: a ParserOutput object + +'ArticleContentViewCustom': DEPRECATED since 1.32, use ArticleRevisionViewCustom instead, +or provide an appropriate ContentHandler. Allows to output the text of the article in a +different format than wikitext. $content: content of the page, as a Content object $title: title of the page -$output: reference to $wgOut +$output: a ParserOutput object 'ArticleDelete': Before an article is deleted. &$wikiPage: the WikiPage (object) being deleted @@ -769,8 +784,8 @@ $article: the article $article: Article object $patrolFooterShown: boolean whether patrol footer is shown -'ArticleViewHeader': Before the parser cache is about to be tried for article -viewing. +'ArticleViewHeader': Control article output. Called before the parser cache is about +to be tried for article viewing. &$article: the article &$pcache: whether to try the parser cache or not &$outputDone: whether the output for this page finished or not. Set to @@ -1670,15 +1685,13 @@ $title: Title object that we need to get a sortkey for &$sortkey: Sortkey to use. 'GetDifferenceEngine': Called when getting a new difference engine interface -object Return false for valid object in $differenceEngine or true for the -default difference engine. +object. Can be used to decorate or replace the default difference engine. $context: IContextSource context to be used for diff $old: Revision ID to show and diff with $new: Either a revision ID or one of the strings 'cur', 'prev' or 'next' $refreshCache: If set, refreshes the diff cache $unhide: If set, allow viewing deleted revs -&$differenceEngine: output parameter, difference engine object to be used for - diff +&$differenceEngine: The difference engine object to be used for the diff 'GetDoubleUnderscoreIDs': Modify the list of behavior switch (double underscore) magic words. Called by MagicWord. @@ -1785,6 +1798,12 @@ $relativeTo: MWTimestamp object of the relative (user-adjusted) timestamp $user: User whose preferences are being used to make timestamp $lang: Language that will be used to render the timestamp +'GetSlotDiffRenderer': Replace or wrap the standard SlotDiffRenderer for some +content type. +$contentHandler: ContentHandler for which the slot diff renderer is fetched. +&$slotDiffRenderer: SlotDiffRenderer to change or replace. +$context: IContextSource + 'getUserPermissionsErrors': Add a permissions error when permissions errors are checked for. Use instead of userCan for most cases. Return false if the user can't do it, and populate $result with the reason in the form of @@ -2527,6 +2546,12 @@ $originalRevId: if the edit restores or repeats an earlier revision (such as a (Used to be called $baseRevId.) $undidRevId: the rev ID (or 0) this edit undid +'PageDeletionDataUpdates': Called when constructing a list of DeferrableUpdate to be +executed when a page is deleted. +$title The Title of the page being deleted. +$revision A RevisionRecord representing the page's current revision at the time of deletion. +&$updates A list of DeferrableUpdate that can be manipulated by the hook handler. + 'PageHistoryBeforeList': When a history page list is about to be constructed. &$article: the article that the history is loading for $context: RequestContext object @@ -2900,6 +2925,13 @@ called after the addition of 'qunit' and MediaWiki testing resources. added to any module. &$ResourceLoader: object +'RevisionDataUpdates': Called when constructing a list of DeferrableUpdate to be +executed to record secondary data about a revision. +$title The Title of the page the revision belongs to +$renderedRevision a RenderedRevision object representing the new revision and providing access + to the RevisionRecord as well as ParserOutput of that revision. +&$updates A list of DeferrableUpdate that can be manipulated by the hook handler. + 'RevisionRecordInserted': Called after a revision is inserted into the database. $revisionRecord: the RevisionRecord that has just been inserted. @@ -2959,9 +2991,9 @@ result augmentors. Note that lists should be in the format name => object and the names in both lists should be distinct. -'SecondaryDataUpdates': Allows modification of the list of DataUpdates to -perform when page content is modified. Currently called by -AbstractContent::getSecondaryDataUpdates. +'SecondaryDataUpdates': DEPRECATED! Use RevisionDataUpdates or override +ContentHandler::getSecondaryDataUpdates instead. +Allows modification of the list of DataUpdates to perform when page content is modified. $title: Title of the page that is being edited. $oldContent: Content object representing the page's content before the edit. $recursive: bool indicating whether DataUpdates should trigger recursive @@ -3301,14 +3333,6 @@ use this to change some selection criteria or substitute a different title. &$title: If the hook returns false, a Title object to use instead of the result from the normal query -'SpecialRecentChangesFilters': DEPRECATED since 1.23! Use -ChangesListSpecialPageStructuredFilters instead. -Called after building form options at RecentChanges. -$special: the special page object -&$filters: associative array of filter definitions. The keys are the HTML - name/URL parameters. Each key maps to an associative array with a 'msg' - (message key) and a 'default' value. - 'SpecialRecentChangesPanel': Called when building form options in SpecialRecentChanges. &$extraOpts: array of added items, to which can be added @@ -3423,14 +3447,6 @@ Special:Upload. $wgVersion: Current $wgVersion for you to use &$versionUrl: Raw url to link to (eg: release notes) -'SpecialWatchlistFilters': DEPRECATED since 1.23! Use -ChangesListSpecialPageStructuredFilters instead. -Called after building form options at Watchlist. -$special: the special page object -&$filters: associative array of filter definitions. The keys are the HTML - name/URL parameters. Each key maps to an associative array with a 'msg' - (message key) and a 'default' value. - 'SpecialWatchlistGetNonRevisionTypes': Called when building sql query for SpecialWatchlist. Allows extensions to register custom values they have inserted to rc_type so they can be returned as part of the watchlist. @@ -4035,10 +4051,9 @@ dumps. One, and only one hook should set this, and return false. &$opts: Options to use for the query &$join: Join conditions -'WikiPageDeletionUpdates': manipulate the list of DeferrableUpdates to be -applied when a page is deleted. Called in WikiPage::getDeletionUpdates(). Note -that updates specific to a content model should be provided by the respective -Content's getDeletionUpdates() method. +'WikiPageDeletionUpdates': DEPRECATED! Use PageDeletionDataUpdates or +override ContentHandler::getDeletionDataUpdates instead. +Manipulates the list of DeferrableUpdates to be applied when a page is deleted. $page: the WikiPage $content: the Content to generate updates for, or null in case the page revision could not be loaded. The delete will succeed despite this.