}
function syslogBlockIp(&$block, &$user) {
- syslog(LOG_INFO, "User '" . $user->getName() .
+ syslog(LOG_NOTICE, "User '" . $user->getName() .
"' blocked '" . (($block->mUser) ? $block->mUser : $block->mAddress) .
"' for '" . $block->mReason . "' until '" . $block->mExpiry . "'");
return true;
}
+
+ function syslogArticleProtect(&$article, &$user, $protect, &$reason, &$moveonly) {
+ $title = $article->mTitle;
+ syslog(LOG_NOTICE, "User '" . $user->getName() . "' " .
+ (($protect) ? "protected" : "unprotected") . " article '" .
+ $title->getPrefixedText() .
+ "' for '" . $reason . "' " . (($moveonly) ? "(moves only)" : "") );
+ return true;
+ }
# Setup -- called once environment is configured
$wgHooks['UserLoginComplete'][] = syslogUserLogin;
$wgHooks['UserLogout'][] = syslogUserLogout;
$wgHooks['BlockIpComplete'][] = syslogBlockIp;
+ $wgHooks['ArticleProtectComplete'][] = syslogArticleProtect;
return true;
}