Merge "RevisionStoreDbTestBase, remove redundant needsDB override"
[lhc/web/wiklou.git] / docs / hooks.txt
index cce50e0..063bbe5 100644 (file)
@@ -2353,7 +2353,7 @@ $title: title of the message (string)
 $code: code (string) denoting the language to try.
 
 'MimeMagicGuessFromContent': Allows MW extensions guess the MIME by content.
-$mimeMagic: Instance of MimeMagic.
+$mimeMagic: Instance of MimeAnalyzer.
 &$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!).
@@ -2362,7 +2362,7 @@ $file: File path.
 
 'MimeMagicImproveFromExtension': Allows MW extensions to further improve the
 MIME type detected by considering the file extension.
-$mimeMagic: Instance of MimeMagic.
+$mimeMagic: Instance of MimeAnalyzer.
 $ext: File extension.
 &$mime: MIME type (in/out).
 
@@ -2370,7 +2370,7 @@ $ext: File extension.
 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.
+$mimeMagic: Instance of MimeAnalyzer.
   Use $mimeMagic->addExtraInfo( $stringOfInfo );
   for adding new MIME info to the list.
   Use $mimeMagic->addExtraTypes( $stringOfTypes );
@@ -2546,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
@@ -2919,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.
 
@@ -2978,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
@@ -3320,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
@@ -3442,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.
@@ -4054,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.