hooks.txt: don't use deprecated hooks in examples
authorOri Livneh <ori@wikimedia.org>
Wed, 4 Nov 2015 02:19:10 +0000 (18:19 -0800)
committerOri Livneh <ori@wikimedia.org>
Wed, 4 Nov 2015 02:19:10 +0000 (18:19 -0800)
Change-Id: I01228e066de46f91d452767516ae0a11a9915bef

docs/hooks.txt

index 427f35e..141a7e5 100644 (file)
@@ -10,8 +10,8 @@ event
      page is saved. A wiki page is deleted. Often there are two events
      associated with a single action: one before the code is run to make the
      event happen, and one after. Each event has a name, preferably in
-     CamelCase. For example, 'UserLogin', 'ArticleSave', 'ArticleSaveComplete',
-     'ArticleDelete'.
+     CamelCase. For example, 'UserLogin', 'PageContentSave',
+     'PageContentSaveComplete', 'ArticleDelete'.
 
 hook
      A clump of code and data that should be run when an event happens. This can
@@ -170,8 +170,8 @@ different: 'onArticleSave', 'onUserLogin', etc.
 The extra data is useful if we want to use the same function or object for
 different purposes. For example:
 
-       $wgHooks['ArticleSaveComplete'][] = array( 'ircNotify', 'TimStarling' );
-       $wgHooks['ArticleSaveComplete'][] = array( 'ircNotify', 'brion' );
+       $wgHooks['PageContentSaveComplete'][] = array( 'ircNotify', 'TimStarling' );
+       $wgHooks['PageContentSaveComplete'][] = array( 'ircNotify', 'brion' );
 
 This code would result in ircNotify being run twice when an article is saved:
 once for 'TimStarling', and once for 'brion'.