Upgrade composer/semver to 1.0.0
[lhc/web/wiklou.git] / docs / hooks.txt
index 7671e6e..2d268b8 100644 (file)
@@ -641,16 +641,14 @@ $popts: parser options to be used for pre-save transformation
 'ArticleProtect': Before an article is protected.
 $wikiPage: the WikiPage being protected
 $user: the user doing the protection
-$protect: boolean whether this is a protect or an unprotect
+$protect: Set of restriction keys
 $reason: Reason for protect
-$moveonly: boolean whether this is for move only or not
 
 'ArticleProtectComplete': After an article is protected.
 $wikiPage: the WikiPage that was protected
 $user: the user who did the protection
-$protect: boolean whether it was a protect or an unprotect
+$protect: Set of restriction keys
 $reason: Reason for protect
-$moveonly: boolean whether it was for move only or not
 
 'ArticlePurge': Before executing "&action=purge".
 $wikiPage: WikiPage (object) to purge
@@ -1581,9 +1579,10 @@ $imagePage: ImagePage object ($this)
 &$html: HTML for the hook to add
 
 'ImagePageFileHistoryLine': Called when a file history line is constructed.
+$imagePage: ImagePage object ($this)
 $file: the file
-$line: the HTML of the history line
-$css: the line CSS class
+&$line: the HTML of the history line
+&$css: the line CSS class
 
 'ImagePageFindFile': Called when fetching the file associated with an image
 page.
@@ -1633,6 +1632,11 @@ Return false to stop further processing of the tag
 $reader: XMLReader object
 $revisionInfo: Array of information
 
+'ImportSources': Called when reading from the $wgImportSources configuration
+variable. Can be used to lazy-load the import sources list.
+&$importSources: The value of $wgImportSources. Modify as necessary. See the
+comment in DefaultSettings.php for the detail of how to structure this array.
+
 'InfoAction': When building information to display on the action=info page.
 $context: IContextSource object
 &$pageInfo: Array of information
@@ -2164,9 +2168,10 @@ $article: the article that the history is loading for
 $context: RequestContext object
 
 'PageHistoryLineEnding': Right before the end <li> is added to a history line.
-$row: the revision row for this line
-$s: the string representing this parsed line
-$classes: array containing the <li> element classes
+$historyAction: the action object
+&$row: the revision row for this line
+&$s: the string representing this parsed line
+&$classes: array containing the <li> element classes
 
 'PageHistoryPager::doBatchLookups': Called after the pager query was run, before
 any output is generated, to allow batch lookups for prefetching information
@@ -2185,6 +2190,7 @@ which depends on user options should install this hook and append its values to
 the key.
 &$confstr: reference to a hash key string which can be modified
 $user: User (object) requesting the page
+&$forOptions: array of options the hash is for
 
 'PageViewUpdates': Allow database (or other) changes to be made after a
 page view is seen by MediaWiki.  Note this does not capture views made
@@ -2669,8 +2675,10 @@ $out: OutputPage object
 
 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink': After creating the "permanent
 link" tab.
-$sktemplate: SkinTemplate object
-$nav_urls: array of tabs
+&$sktemplate: SkinTemplate object
+&$nav_urls: array of tabs
+&$revid: The revision id of the permanent link
+&$revid2: The revision id of the permanent link, second time
 
 'SkinTemplateGetLanguageLink': After building the data for a language link from
 which the actual html is constructed.
@@ -3110,7 +3118,9 @@ $descriptor: (array) the HTMLForm descriptor
 
 'UploadFormSourceDescriptors': after the standard source inputs have been
 added to the descriptor
-$descriptor: (array) the HTMLForm descriptor
+&$descriptor: (array) the HTMLForm descriptor
+&$radio: Boolean, if source type should be shown as radio button
+$selectedSourceType: The selected source type
 
 'UploadVerification': Additional chances to reject an uploaded file. Consider
 using UploadVerifyFile instead.