From 9866995f356e04e7a03cc1b70d3936b40909281c Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Tue, 3 Nov 2015 18:19:10 -0800 Subject: [PATCH] hooks.txt: don't use deprecated hooks in examples Change-Id: I01228e066de46f91d452767516ae0a11a9915bef --- docs/hooks.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index 427f35e773..141a7e5222 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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'. -- 2.20.1