[Mediawiki-l] ArticleSave hook

ngungo ngungo at 56degrees.com
Sat Mar 5 15:41:14 UTC 2005



In the section Events and parameters of hooks.doc (for ArticleSave)
there is a list of parameters:

'ArticleSave': before an article is saved
$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 #

My question is how do I make use of these parameters in myFunction()? Or
how to declare them before using them? Let's say for example parameter
$text, I tried: die($text); it did not show anything.

Thanks,
ngungo


Background: ==================
In LocalSettings.php, I inserted:

require_once('extensions/myExtension.php');
$wgHooks['ArticleSave'][] = 'myFunction';


in extension directory I have a file myExtension.php as following:

<?php
function myFunction() {
	return true;
}
?>






More information about the MediaWiki-l mailing list