From: Ori Livneh Date: Wed, 4 Nov 2015 02:19:10 +0000 (-0800) Subject: hooks.txt: don't use deprecated hooks in examples X-Git-Tag: 1.31.0-rc.0~9106^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=9866995f356e04e7a03cc1b70d3936b40909281c;p=lhc%2Fweb%2Fwiklou.git hooks.txt: don't use deprecated hooks in examples Change-Id: I01228e066de46f91d452767516ae0a11a9915bef --- 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'.