}
# And update recentchanges
if( $this->updateRecentChanges ) {
- # Don't add private logs to RC!
- if( !isset($wgLogRestrictions[$this->type]) || $wgLogRestrictions[$this->type]=='*' ) {
- $titleObj = SpecialPage::getTitleFor( 'Log', $this->type );
- $rcComment = $this->getRcComment();
- RecentChange::notifyLog( $now, $titleObj, $this->doer, $rcComment, '',
- $this->type, $this->action, $this->target, $this->comment, $this->params, $newId );
- }
+ $titleObj = SpecialPage::getTitleFor( 'Log', $this->type );
+ $rcComment = $this->getRcComment();
+ RecentChange::notifyLog( $now, $titleObj, $this->doer, $rcComment, '', $this->type,
+ $this->action, $this->target, $this->comment, $this->params, $newId );
} else if( $this->sendToUDP ) {
# Notify external application via UDP.
# We send this to IRC but do not want to add it the RC table.
RecentChange::notifyMove( $timestamp, $oldTitle, $newTitle, $user, $comment, $ip, true );
}
- public static function notifyLog( $timestamp, &$title, &$user, $actionComment, $ip='',
- $type, $action, $target, $logComment, $params, $newId=0 )
+ public static function notifyLog( $timestamp, &$title, &$user, $actionComment, $ip='', $type,
+ $action, $target, $logComment, $params, $newId=0 )
{
+ global $wgLogRestrictions;
+ # Don't add private logs to RC!
+ if( isset($wgLogRestrictions[$type]) && !$wgLogRestrictions[$type] == '*' ) {
+ return false;
+ }
$rc = self::newLogEntry( $timestamp, $title, $user, $actionComment, $ip, $type, $action,
$target, $logComment, $params, $newId );
$rc->save();
+ return true;
}
public static function newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip='',
- $type, $action, $target, $logComment, $params, $newId=0 )
+ $type, $action, $target, $logComment, $params, $newId=0 )
{
global $wgRequest;