docs: Update outdated PageContentSave hook documentation
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Tue, 26 Feb 2019 13:09:51 +0000 (14:09 +0100)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Tue, 26 Feb 2019 13:15:35 +0000 (14:15 +0100)
I updated https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSave
already.

Inspired by Id8f2ac2.

Bug:  T216893
Change-Id: I41a310c04be37693c1ba3f8ce15d1405674c1eae

docs/hooks.txt

index 8b5e4d7..282fdbc 100644 (file)
@@ -2450,10 +2450,14 @@ $wgLang: the user language
 $wikiPage: the WikiPage (object) being saved
 $user: the user (object) saving the article
 $content: the new article content, as a Content object
-$summary: the article summary (comment)
-$isminor: minor flag
-$iswatch: watch flag
-$section: section #
+&$summary: CommentStoreComment object containing the edit comment. Can be replaced with a new one.
+$isminor: Boolean flag specifying if the edit was marked as minor.
+$iswatch: Previously a watch flag. Currently unused, always null.
+$section: Previously the section number being edited. Currently unused, always null.
+$flags: All EDIT_… flags (including EDIT_MINOR) as an integer number. See WikiPage::doEditContent
+  documentation for flags' definition.
+$status: StatusValue object for the hook handlers resulting status. Either set $status->fatal() or
+  return false to abort the save action.
 
 'PageContentSaveComplete': After an article has been updated.
 $wikiPage: WikiPage modified