Manual:MediaWiki hooks/ArticleSave/1.5
From MediaWiki.org
| ArticleSave | |
|---|---|
| Available from version 1.4.0 Occurs whenever the software receives a request to save an article |
|
*Define function: |
function fnMyHook(&$article, &$user, &$text, &$summary, &$minoredit, &$watchthis, &$sectionanchor) { ... }
|
*Attach hook: |
$wgHooks['ArticleSave'][] = 'fnMyHook'; |
| Called from: | Article.php |
*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:ArticleSave extensions.
[edit] Details
- $article: the article (object) being saved
- $user: the user (object) saving the article
- $text: the new article text
- $summary: the article summary (comment)
- $isminor: minor flag
- $iswatch: watch flag
- $section: section #
[edit] Notes
This did not apply to newly uploaded images until v1.4.5.
In previous versions, this hook was included in EditPage.php: EditPage.attemptSave() and Image.php: RecordUpload()

