[Mediawiki-l] Retrieving info from POST
Chris Bruyere
ccmbruyere at yahoo.ca
Thu Aug 24 16:25:18 UTC 2006
Rob Church <robchur at gmail.com> wrote:
If I read the above and understand it right, then the correct thing to
do in this situation is to locate or introduce a suitable hook
function into the "save" step of the edit handler, so that when a page
is updated, the corresponding entries in a custom table are also
saved.
For further information on hooks, take a look at docs/hooks.txt (it's
in the default MediaWiki distribution packages and will be present in
SVN checkouts, too).
Rob Church
Hi Rob. Thanks again for the reply.
I've tried hooks but something must be wrong:
- In LocalSetting.php
I have somethign like:
$wgHooks['ArticleSave'][] = 'ArticleWasSaved';
- In the class were my data is updated, I have
contructor(..)
{
global $wgHooks;
$wgHooks['ArticleSaved'] = array($this,'OnEventArticleSaved');
}
Both functions:
{
echo "FUNCTION_NAME was called"
return true;
}
However, it seems like only AritcleWasSaved is called and even though it returns true, the save process stops (ie, the page reloads into the edit mode).
OnEventArticleSaved is not being called.
Any ideas? Thanks again for your help.
Chris
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the MediaWiki-l
mailing list