Sync docs/hooks.txt:
[lhc/web/wiklou.git] / docs / hooks.txt
index 5d28c47..a139a8e 100644 (file)
@@ -244,8 +244,8 @@ $block: The block from which the autoblock is coming.
 'AbortLogin': Return false to cancel account login.
 $user: the User object being authenticated against
 $password: the password being submitted, not yet checked for validity
-&$retval: a Login class constant to return from authenticateUserData();
-          default is Login::ABORTED. Note that the client may be using
+&$retval: a LoginForm class constant to return from authenticateUserData();
+          default is LoginForm::ABORTED. Note that the client may be using
           a machine API rather than the HTML user interface.
 
 'AbortMove': allows to abort moving an article (title)
@@ -350,6 +350,12 @@ the database
 $article: the article (object) being loaded from the database
 $content: the content (string) of the article
 
+'ArticleConfirmDelete': before writing the confirmation form for article
+       deletion
+$article: the article (object) being deleted
+$output: the OutputPage object ($wgOut)
+&$reason: the reason (string) the article is being deleted
+
 'ArticleDelete': before an article is deleted
 $article: the article (object) being deleted
 $user: the user (object) deleting the article
@@ -547,6 +553,11 @@ $user: the user who did the block (not the one being blocked)
 $isbn: ISBN to show information for
 $output: OutputPage object in use
 
+'CacheHeadersAfterSet': after cache headers have been set in 
+OutputPage::sendCacheControl, so they can be overridden without 
+disabling output method
+$this: OutputPage instance
 'CategoryPageView': before viewing a categorypage in CategoryPage::view
 $catpage: CategoryPage instance
 
@@ -558,6 +569,9 @@ $catpage: CategoryPage instance
 $unpatrolled:  Whether or not we are showing unpatrolled changes.
 $watched:      Whether or not the change is watched by the user.
 
+'ConfirmEmailComplete': Called after a user's email has been confirmed successfully
+$user: user (object) whose email is being confirmed
+
 'ContribsPager::getQueryInfo': Before the contributions query is about to run
 &$pager: Pager object for contributions
 &queryInfo: The query for the contribs Pager
@@ -773,6 +787,11 @@ $title: Title object of page
 $url: string value as output (out parameter, can modify)
 $query: query options passed to Title::getLocalURL()
 
+'getOtherBlockLogLink': Get links to the block log from extensions which blocks
+       users and/or IP addresses too
+$otherBlockLink: An array with links to other block logs
+$$this->ip: The requested IP address or username
+
 'GetPreferences': modify user preferences
 $user: User whose preferences are being modified.
 &$preferences: Preferences description array, to be fed to an HTMLForm object
@@ -815,6 +834,11 @@ $title: Title object, pages linked to this title are purged.
 $imagePage: ImagePage object ($this)
 $output: $wgOut
 
+'ImagePageAfterImageLinks': called after the image links section on an image 
+       page is built
+$imagePage: ImagePage object ($this)
+&$html: HTML for the hook to add
+
 'ImagePageFileHistoryLine': called when a file history line is contructed
 $file: the file
 $line: the HTML of the history line
@@ -825,6 +849,20 @@ $page: ImagePage object
 &$file: File object
 &$displayFile: displayed File object
 
+'ImgAuthBeforeStream': executed before file is streamed to user, but only when
+       using img_auth.php
+&$title: the Title object of the file as it would appear for the upload page
+&$path: the original file and path name when img_auth was invoked by the the web
+       server
+&$name: the name only component of the file
+&$result: The location to pass back results of the hook routine (only used if
+       failed)
+       $result[0]=The index of the header message
+       $result[1]=The index of the body text message
+       $result[2 through n]=Parameters passed to body text message. Please note the
+       header message cannot receive/use parameters.
+
+
 'InitializeArticleMaybeRedirect': MediaWiki check to see if title is a redirect
 $title: Title object ($wgTitle)
 $request: WebRequest
@@ -838,6 +876,9 @@ but after noinclude/includeonly/onlyinclude and other processing.
 &$text: string containing partially parsed text
 &$this->mStripState: Parser's internal StripState object
 
+'InvalidateEmailComplete': Called after a user's email has been invalidated successfully
+$user: user (object) whose email is being invalidated
+
 'IsFileCacheable': Override the result of Article::isFileCacheable() (if true)
 $article: article (object) being checked
 
@@ -852,7 +893,7 @@ $addr: The e-mail address entered by the user
 
 'isValidPassword': Override the result of User::isValidPassword()
 $password: The password entered by the user
-&$result: Set this to either true (passes) or the key for a message error
+&$result: Set this and return false to override the internal checks
 $user: User the password is being validated for
 
 'LanguageGetMagic': DEPRECATED, use $magicWords in a file listed in 
@@ -944,7 +985,7 @@ $code: language code
 succeeded or failed. No return data is accepted; this hook is for auditing only.
 $user: the User object being authenticated against
 $password: the password being submitted and found wanting
-$retval: a Login class constant with authenticateUserData() return
+$retval: a LoginForm class constant with authenticateUserData() return
        value (SUCCESS, WRONG_PASS, etc)
 
 'LogLine': Processes a single log entry on Special:Log
@@ -1203,6 +1244,23 @@ $user: User (object) changing his passoword
 $newPass: new password
 $error: error (string) 'badretype', 'wrongpassword', 'error' or 'success'
 
+'ProtectionForm::buildForm': called after all protection type fieldsets are made in the form
+$article: the title being (un)protected
+$output: a string of the form HTML so far
+
+'ProtectionForm::save': called when a protection form is submitted
+$article: the title being (un)protected
+$errorMsg: an html message string of an error
+
+'ProtectionForm::showLogExtract': called after the protection log extract is shown
+$article: the page the form is shown for
+$out: OutputPage object
+
+'ProtectionFormGetApplicableTypes': Allows extensions to modify the types of protection
+  that can be applied.
+$title: The title in question.
+&$types: The types of protection available.
+
 'RawPageViewBeforeOutput': Right before the text is blown out in action=raw
 &$obj: RawPage object
 &$text: The text that's going to be the output
@@ -1231,6 +1289,9 @@ $term : Search term string
 
 'SetupAfterCache': Called in Setup.php, after cache objects are set
 
+'ShowMissingArticle': Called when generating the output for a non-existent page
+$article: The article object corresponding to the page
+
 'ShowRawCssJs': Customise the output of raw CSS and JavaScript in page views
 $text: Text being shown
 $title: Title of the custom script/stylesheet page
@@ -1402,6 +1463,9 @@ $opts: FormOptions for this request
 target doesn't exist
 $title: title object generated from the text entred by the user
 
+'SpecialSearchProfiles': allows modification of search profiles
+&$profiles: profiles, which can be modified.
+
 'SpecialSearchResults': called before search result display when there
 are matches
 $term: string of search term
@@ -1418,7 +1482,7 @@ $term: string of search term
 
 'SpecialUploadComplete': Called after successfully uploading a file from 
 Special:Upload
-$form: The UploadForm object
+$form: The SpecialUpload object
 
 'SpecialVersionExtensionTypes': called when generating the extensions credits,
 use this to change the tables headers
@@ -1463,16 +1527,20 @@ $article: article object removed
 $user: user that watched
 $article: article object that was watched
 
-'UploadForm:initial': before the upload form is generated
-$form: UploadForm object
-You might set the member-variables $uploadFormTextTop and
-$uploadFormTextAfterSummary to inject text (HTML) either before
-or after the editform.
+'UploadCreateFromRequest': when UploadBase::createFromRequest has been called
+string $type: the requested upload type
+&$className: the class name of the Upload instance to be created
+
+'UploadComplete': when Upload completes an upload
+&$upload: an UploadBase child instance
 
-'UploadForm:BeforeProcessing': at the beginning of processUpload()
-$form: UploadForm object
-Lets you poke at member variables like $mUploadDescription before the
-file is saved.
+'UploadFormInitDescriptor': after the descriptor for the upload form as been 
+assembled
+array $descriptor: the HTMLForm descriptor
+
+'UploadFormSourceDescriptors': after the standard source inputs have been 
+added to the descriptor
+array $descriptor: the HTMLForm descriptor
 
 'UploadVerification': additional chances to reject an uploaded file
 string $saveName: destination file name
@@ -1520,7 +1588,7 @@ override the default password checks
        determine if the password was valid
 
 'UserCreateForm': change to manipulate the login form
-$sp: SpecialCreateAccount instance
+$template: SimpleTemplate instance for the form
 
 'UserCryptPassword': called when hashing a password, return false to implement
 your own hashing method
@@ -1557,6 +1625,14 @@ $user: User object
 $user: User to get rights for
 &$rights: Current rights
 
+'UserIsBlockedFrom': Check if a user is blocked from a specific page (for specific block
+       exemptions).
+$user: User in question
+$title: Title of the page in question
+&$blocked: Out-param, whether or not the user is blocked from that page.
+&$allowUsertalk: If the user is blocked, whether or not the block allows users to edit their
+                  own user talk pages.
+
 'UserIsBlockedGlobally': Check if user is blocked on all wikis.
 &$user: User object
 $ip: User's IP address
@@ -1590,7 +1666,7 @@ $user: the user object that was created on login
 $inject_html: Any HTML to inject after the "logged in" message.
 
 'UserLoginForm': change to manipulate the login form
-$sp: SpecialUserLogin instance
+$template: SimpleTemplate instance for the form
 
 'UserLoginMailPassword': Block users from emailing passwords
 $name: the username to email the password of.