X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=docs%2Fhooks.txt;h=a638703aca89fbed61dce4f1d885a16ab72b67f4;hb=68e8c6ca53c2c59d265d01a9583de85161fbfff8;hp=51cf65cebdc7ba33e30d6a671a2d71f83bcdb369;hpb=90c92cffff95e4575365354c4e73a8b02555806d;p=lhc%2Fweb%2Fwiklou.git diff --git a/docs/hooks.txt b/docs/hooks.txt index 51cf65cebd..a638703aca 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -269,6 +269,9 @@ $reason: the reason for the move (added in 1.13) 'AbortNewAccount': Return false to cancel explicit account creation. $user: the User object about to be created (read-only, incomplete) &$msg: out parameter: HTML to display on abort +&$status: out parameter: Status object to return, replaces the older $msg param (added in 1.23) + Create the object with Status::newFatal() to ensure proper API error messages + are returned when creating account through API clients. 'AbortTalkPageEmailNotification': Return false to cancel talk page email notification $targetUser: the user whom to send talk page email notification @@ -538,6 +541,7 @@ $wikiPage: WikiPage (object) being modified Wiki::articleFromTitle(). $title: Title (object) used to create the article object $article: Article (object) that will be returned +$context: IContextSource (object) 'ArticleInsertComplete': After a new article is created. DEPRECATED, use PageContentInsertComplete. @@ -843,6 +847,15 @@ content model name, but no entry for that model exists in $wgContentHandlers. $modeName: the requested content model name &$handler: set this to a ContentHandler object, if desired. +'ContentModelCanBeUsedOn': Called to determine whether that content model can +be used on a given page. This is especially useful to prevent some content models +to be used in some special location. +$contentModel: ID of the content model in question +$title: the Title in question. +&$ok: Output parameter, whether it is OK to use $contentModel on $title. +Handler functions that modify $ok should generally return false to prevent further +hooks from further modifying $ok. + 'ConvertContent': Called by AbstractContent::convert when a conversion to another content model is requested. $content: The Content object to be converted. @@ -895,8 +908,9 @@ $new: the ?new= param value from the url 'DiffRevisionTools': Override or extend the revision tools available from the diff view, i.e. undo, etc. -$rev: Revision object +$newRev: Revision object of the "new" revision &$links: Array of HTML links +$oldRev: Revision object of the "old" revision (may be null) 'DiffViewHeader': Called before diff display $diff: DifferenceEngine object that's calling @@ -1953,6 +1967,12 @@ $form: the PreferencesForm object. This is a ContextSource as well $key: the section name &$legend: the legend text. Defaults to wfMessage( "prefs-$key" )->text() but may be overridden +'PreferencesFormPreSave': Override preferences being saved + $formData: array of user submitted data + $form: PreferencesForm object, also a ContextSource + $user: User object with preferences to be saved set + &$result: boolean indicating success + 'PrefixSearchBackend': Override the title prefix search used for OpenSearch and AJAX search suggestions. Put results into &$results outparam and return false. $ns : array of int namespace keys to search in