$block: the Block object that was saved
$user: the user who did the block (not the one being blocked)
+'UnknownAction': An unknown "action" has occured (useful for defining
+ your own actions)
+$action: action name
+$article: article "acted on"
+
'UserLoginComplete': after a user has logged in
$user: the user object that was created on login
# Hook for article save
- function syslogArticleSave(&$article, &$user, &$text, $summary, $isminor, $iswatch, $section) {
+ function syslogArticleSave(&$article, &$user, &$text, $summary,
+ $isminor, $iswatch, $section)
+ {
$title = $article->mTitle;
syslog(LOG_NOTICE, "User '" . $user->getName() . "' saved '" .
$title->getPrefixedText() .
$wgArticle->view();
break;
default:
- $wgOut->errorpage( "nosuchaction", "nosuchactiontext" );
+ if (wfRunHooks('UnknownAction', $action, $wgArticle)) {
+ $wgOut->errorpage( "nosuchaction", "nosuchactiontext" );
+ }
}
}
wfProfileOut( "main-action" );