Revert r32409 -- smart quotes infecting our nice clean text
[lhc/web/wiklou.git] / docs / hooks.txt
index 0d99832..d6379af 100644 (file)
@@ -268,6 +268,14 @@ before showing the edit form ( EditPage::edit() ). This is triggered
 on &action=edit.
 $EditPage : the EditPage object
 
+'APIEditBeforeSave': before saving a page with api.php?action=edit,
+after processing request parameters. Return false to let the request
+fail, returning an error message or an <edit result="Failure"> tag
+if $resultArr was filled.
+$EditPage : the EditPage object
+$text : the new text of the article (has yet to be saved)
+$resultArr : data in this array will be added to the API result
+
 'ArticleAfterFetchContent': after fetching content of an article from the database
 $article: the article (object) being loaded from the database
 $content: the content (string) of the article
@@ -332,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)
@@ -454,6 +466,18 @@ $user: the user who did the block (not the one being blocked)
 $isbn: ISBN to show information for
 $output: OutputPage object in use
 
+'BrokenLink': Before the HTML is created for a broken (i.e. red) link
+&$this: Linker instance
+$nt: the page title
+$query: the URL query string passed in
+&$u: the URL of this link
+&$style: the inline CSS style
+&$prefix: a prefix prepended to the linked text
+&$text: the text placed by the user in the wiki-link
+&$inside: any additional alphanumeric characters placed after the wiki-link,
+that are made part of the link text
+&$trail: text placed immediately after the HTML link
+
 'CategoryPageView': before viewing a categorypage in CategoryPage::view
 $catpage: CategoryPage instance
 
@@ -562,9 +586,23 @@ $text: text of the mail
 &$list: List object (defaults to NULL, change it to an object instance and return
 false override the list derivative used)
 
+'FileDeleteComplete': When a file is deleted
+$file: reference to the deleted file
+$oldimage: in case of the deletion of an old image, the name of the old file
+$article: in case all revisions of the file are deleted a reference to the article 
+         associated with the file.
+$user: user who performed the deletion
+$reason: reason
+
 'FileUpload': When a file upload occurs
 $file : Image object representing the file that was uploaded
 
+'FileUndeleteComplete': When a file is undeleted
+$title: title object to the file
+$fileVersions: array of undeleted versions. Empty if all versions were restored
+$user: user who performed the undeletion
+$reason: reason
+
 'GetBlockedStatus': after loading blocking status of an user from the database
 $user: user (object) being checked
 
@@ -781,8 +819,8 @@ $text: actual text
 'ParserClearState': called at the end of Parser::clearState()
 $parser: Parser object being cleared
 
-'ParserFirstCallInit': called when the ther parser initialises for the first time
-$parser: Parser object being cleared
+'ParserFirstCallInit': called when the parser initialises for the first time
+&$parser: Parser object being cleared
 
 'ParserGetVariableValueSwitch': called when the parser need the value of a custom magic word
 $parser: Parser object
@@ -948,6 +986,26 @@ $content_actions: array of tabs
 'SpecialContributionsBeforeMainOutput': Before the form on Special:Contributions
 $id: User identifier
 
+'SpecialListusersDefaultQuery': called right before the end of UsersPager::getDefaultQuery()
+$pager: The UsersPager instance
+$query: The query array to be returned
+
+'SpecialListusersFormatRow': called right before the end of UsersPager::formatRow()
+$item: HTML to be returned. Will be wrapped in <li></li> after the hook finishes
+$row: Database row object
+
+'SpecialListusersHeader': called before closing the <fieldset> in UsersPager::getPageHeader()
+$pager: The UsersPager instance
+$out: The header HTML
+
+'SpecialListusersHeaderForm': called before adding the submit button in UsersPager::getPageHeader()
+$pager: The UsersPager instance
+$out: The header HTML
+
+'SpecialListusersQueryInfo': called right before the end of UsersPager::getQueryInfo()
+$pager: The UsersPager instance
+$query: The query array to be returned
+
 'SpecialMovepageAfterMove': called after moving a page
 $movePage: MovePageForm object
 $oldTitle: old title (object)
@@ -977,6 +1035,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
 
@@ -1025,7 +1091,7 @@ string $tempName: filesystem path to the temporary file for checks
 string &$error: output: HTML error to show if upload canceled by returning false
 
 'UploadComplete': Upon completion of a file upload
-$image: Image object representing the file that was uploaded
+$uploadForm: Upload form object. File can be accessed by $uploadForm->mLocalFile.
 
 'userCan': To interrupt/advise the "user can do X to Y article" check.
        If you want to display an error message, try getUserPermissionsErrors.