Update.
[lhc/web/wiklou.git] / docs / hooks.txt
index 4fe5326..06de421 100644 (file)
@@ -340,7 +340,11 @@ $moveonly: boolean whether it was for move only or not
 'ArticlePurge': before executing "&action=purge" 
 $article: article (object) to purge
 
-'ArticleRevisionUndeleted' after an article revision is restored
+'ArticleRevisionVisiblitySet': called when changing visibility of one or more
+revision of an article
+&$title: title object of the article
+
+'ArticleRevisionUndeleted': after an article revision is restored
 $title: the article title
 $revision: the revision
 $oldPageID: the page ID of the revision when archived (may be null)
@@ -425,7 +429,8 @@ rendered inline in wiki pages or galleries in category pages.
 &$time: image timestamp
 
 'BeforePageDisplay': Prior to outputting a page
-$out: OutputPage object
+&$out: OutputPage object
+&$skin: Skin object
 
 'BeforeParserFetchTemplateAndtitle': before a template is fetched by Parser
 &$parser: Parser object
@@ -539,6 +544,14 @@ Alternatively, modifying $error and returning true will cause the contents of $e
 to be echoed at the top of the edit form as wikitext. Return true without altering
 $error to allow the edit to proceed.
 
+'EditPageBeforeConflictDiff': allows modifying the EditPage object and output
+when there's an edit conflict.  Return false to halt normal diff output; in
+this case you're responsible for computing and outputting the entire "conflict"
+part, i.e., the "difference between revisions" and "your text" headers and
+sections.
+&$editor: EditPage instance
+&$out: OutputPage instance
+
 'EditPageBeforeEditButtons':  allows modifying the edit buttons below the textarea in the edit form
 &$editpage: The current EditPage object
 &$buttons: Array of edit buttons "Save", "Preview", "Live", and "Diff"
@@ -602,6 +615,11 @@ $reason: reason
 'GetBlockedStatus': after loading blocking status of an user from the database
 $user: user (object) being checked
 
+'GetCacheVaryCookies': get cookies that should vary cache options
+$out: OutputPage object
+&$cookies: array of cookies name, add a value to it if you want to add a cookie
+       that have to vary cache options
+
 'GetFullURL': modify fully-qualified URLs used in redirects/export/offsite data
 $title: Title object of page
 $url: string value as output (out parameter, can modify)
@@ -868,7 +886,7 @@ $form : PreferencesForm object
 
 'PrefixSearchBackend': Override the title prefix search used for OpenSearch and
 AJAX search suggestions. Put results into &$results outparam and return false.
-$ns : int namespace key to search in
+$ns : array of int namespace keys to search in
 $search : search term (not guaranteed to be conveniently normalized)
 $limit : maximum number of results to return
 &$results : out param: array of page names (strings)
@@ -898,11 +916,15 @@ $out: output page to render to, probably $wgOut
 $form: the PreferencesForm
 $user: the User object to load preferences from
 
+'RevisionInsertComplete': called after a revision is inserted into the DB
+$revision: the Revision
+
 'SavePreferences': called at the end of PreferencesForm::savePreferences; 
                    returning false prevents the preferences from being saved.
 $form: the PreferencesForm
 $user: the User object to save preferences to
-$message: change this to set an error message (ignored if the hook does notreturn fals)
+$message: change this to set an error message (ignored if the hook does not return false)
+$old: old preferences of the user
 
 'SearchUpdate': Prior to search update completion
 $id : Page id
@@ -1031,6 +1053,14 @@ $list: list (array) of core special pages
 'SpecialSearchNogomatch': called when user clicked the "Go" button but the target doesn't exist
 $title: title object generated from the text entred by the user
 
+'SpecialSearchResults': called before search result display when there are matches
+$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
+
 'SpecialVersionExtensionTypes': called when generating the extensions credits, use this to change the tables headers
 $extTypes: associative array of extensions types
 
@@ -1081,6 +1111,10 @@ string &$error: output: HTML error to show if upload canceled by returning false
 'UploadComplete': Upon completion of a file upload
 $uploadForm: Upload form object. File can be accessed by $uploadForm->mLocalFile.
 
+'UserArrayFromResult': called when creating an UserArray object from a database result
+&$userArray: set this to an object to override the default object returned
+$res: database result used to create the object
+
 'userCan': To interrupt/advise the "user can do X to Y article" check.
        If you want to display an error message, try getUserPermissionsErrors.
 $title: Title object being checked against
@@ -1104,8 +1138,24 @@ $template: SimpleTemplate instance for the form
 $user: User to get groups for
 &$groups: Current effective groups
 
+'UserGetEmail': called when getting an user email address
+$user: User object
+&$email: email, change this to override local email
+
+'UserGetEmailAuthenticationTimestamp': called when getting the timestamp of email authentification
+$user: User object
+&$timestamp: timestamp, change this to override local email authentification timestamp
+
+'UserGetImplicitGroups': Called in User::getImplicitGroups()
+&$groups: List of implicit (automatically-assigned) groups
+
+'UserGetRights': Called in User::getRights()
+$user: User to get rights for
+&$rights: Current rights
+
 'UserLoginComplete': after a user has logged in
 $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
 $template: SimpleTemplate instance for the form
@@ -1115,23 +1165,28 @@ $user: the user object that is about to be logged out
        
 'UserLogoutComplete': after a user has logged out
 $user: the user object _after_ logout (won't have name, ID, etc.)
+$inject_html: Any HTML to inject after the "logged out" message.
 
 'UserRights': After a user's group memberships are changed
 $user  : User object that was changed
 $add   : Array of strings corresponding to groups added
 $remove: Array of strings corresponding to groups removed
-                     
-'UserGetImplicitGroups': Called in User::getImplicitGroups()
-&$groups: List of implicit (automatically-assigned) groups
-
-'UserGetRights': Called in User::getRights()
-$user: User to get rights for
-&$rights: Current rights
 
 'UserRetrieveNewTalks': called when retrieving "You have new messages!" message(s)
 $user: user retrieving new talks messages
 $talks: array of new talks page(s)
 
+'UserSaveSettings': called when saving user settings
+$user: User object
+
+'UserSetEmail': called when changing user email address
+$user: User object
+&$email: new email, change this to override new email address
+
+'UserSetEmailAuthenticationTimestamp': called when setting the timestamp of email authentification
+$user: User object
+&$timestamp: new timestamp, change this to override local email authentification timestamp
+
 'UserToggles': called when initialising User::$mToggles, use this to add new toggles
 $toggles: array of toggles to add