Merge "Removed useless begin()/commit() calls as DBO_TRX is not on in cli mode."
[lhc/web/wiklou.git] / docs / hooks.txt
index ca46578..96757cd 100644 (file)
@@ -290,6 +290,12 @@ $revCount: Number of revisions in the XML file
 $sRevCount: Number of sucessfully imported revisions
 $pageInfo: associative array of page information
 
+'AfterFinalPageOutput': Nearly at the end of OutputPage::output() but
+before OutputPage::sendCacheControl() and final ob_end_flush() which
+will send the buffered output to the client. This allows for last-minute
+modification of the output within the buffer by using ob_get_clean().
+$output: The OutputPage object where output() was called
+
 'AjaxAddScript': Called in output page just before the initialisation
 of the javascript ajax engine. The hook is only called when ajax
 is enabled ( $wgUseAjax = true; ).
@@ -314,6 +320,14 @@ $body: Body of the message
 Use this to extend core API modules.
 &$module: Module object
 
+'ApiCheckCanExecute': Called during ApiMain::checkCanExecute. Use to
+further authenticate and authorize API clients before executing the
+module. Return false and set a message to cancel the request.
+$module: Module object
+$user: Current user
+&$message: API usage message to die with, as a message key or array
+as accepted by ApiBase::dieUsageMsg.
+
 '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
@@ -397,6 +411,11 @@ is the User object. In the hook, just add your callback to the
 $tokenFunctions array and return true (returning false makes no sense)
 $tokenFunctions: array(action => callback)
 
+'ApiMain::onException': Called by ApiMain::executeActionWithErrorHandling()
+when an exception is thrown during API action execution.
+$apiMain: Calling ApiMain instance.
+$e: Exception object.
+
 'ApiRsdServiceApis': Add or remove APIs from the RSD services list.
 Each service should have its own entry in the $apis array and have a
 unique name, passed as key for the array that represents the service data.
@@ -468,7 +487,7 @@ $summary: Edit summary/comment
 $isMinor: Whether or not the edit was marked as minor
 $isWatch: (No longer used)
 $section: (No longer used)
-$flags: Flags passed to Article::doEdit()
+$flags: Flags passed to WikiPage::doEdit()
 $revision: New Revision of the article
 
 'ArticleMergeComplete': after merging to article using Special:Mergehistory
@@ -536,7 +555,7 @@ $summary: Edit summary/comment
 $isMinor: Whether or not the edit was marked as minor
 $isWatch: (No longer used)
 $section: (No longer used)
-$flags: Flags passed to Article::doEdit()
+$flags: Flags passed to WikiPage::doEdit()
 $revision: New Revision of the article
 $status: Status object about to be returned by doEdit()
 $baseRevId: the rev ID (or false) this edit was based on
@@ -792,7 +811,7 @@ pages
 $editPage: EditPage    object
 
 'EditPage::attemptSave': called before an article is
-saved, that is before Article::doEdit() is called
+saved, that is before WikiPage::doEdit() is called
 $editpage_Obj: the current EditPage object
 
 'EditPage::importFormData': allow extensions to read additional data
@@ -1698,6 +1717,11 @@ in the $searchEngine->namespaces array.
 $query : Original query.
 &$parsed : Resultant query with the prefixes stripped.
 
+'SearchResultInitFromTitle': Set the revision used when displaying a page in
+search results.
+$title : Current Title object being displayed in search results.
+&$id: Revision ID (default is false, for latest)
+
 'SearchableNamespaces': An option to modify which namespaces are searchable.
 &$arr : Array of namespaces ($nsId => $name) which will be used.