Index: trunk/phase3/includes/RecentChange.php |
— | — | @@ -473,16 +473,22 @@ |
474 | 474 | RecentChange::notifyMove( $timestamp, $oldTitle, $newTitle, $user, $comment, $ip, true ); |
475 | 475 | } |
476 | 476 | |
477 | | - public static function notifyLog( $timestamp, &$title, &$user, $actionComment, $ip='', |
478 | | - $type, $action, $target, $logComment, $params, $newId=0 ) |
| 477 | + public static function notifyLog( $timestamp, &$title, &$user, $actionComment, $ip='', $type, |
| 478 | + $action, $target, $logComment, $params, $newId=0 ) |
479 | 479 | { |
| 480 | + global $wgLogRestrictions; |
| 481 | + # Don't add private logs to RC! |
| 482 | + if( isset($wgLogRestrictions[$type]) && !$wgLogRestrictions[$type] == '*' ) { |
| 483 | + return false; |
| 484 | + } |
480 | 485 | $rc = self::newLogEntry( $timestamp, $title, $user, $actionComment, $ip, $type, $action, |
481 | 486 | $target, $logComment, $params, $newId ); |
482 | 487 | $rc->save(); |
| 488 | + return true; |
483 | 489 | } |
484 | 490 | |
485 | 491 | public static function newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip='', |
486 | | - $type, $action, $target, $logComment, $params, $newId=0 ) |
| 492 | + $type, $action, $target, $logComment, $params, $newId=0 ) |
487 | 493 | { |
488 | 494 | global $wgRequest; |
489 | 495 | |
Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -80,13 +80,10 @@ |
81 | 81 | } |
82 | 82 | # And update recentchanges |
83 | 83 | if( $this->updateRecentChanges ) { |
84 | | - # Don't add private logs to RC! |
85 | | - if( !isset($wgLogRestrictions[$this->type]) || $wgLogRestrictions[$this->type]=='*' ) { |
86 | | - $titleObj = SpecialPage::getTitleFor( 'Log', $this->type ); |
87 | | - $rcComment = $this->getRcComment(); |
88 | | - RecentChange::notifyLog( $now, $titleObj, $this->doer, $rcComment, '', |
89 | | - $this->type, $this->action, $this->target, $this->comment, $this->params, $newId ); |
90 | | - } |
| 84 | + $titleObj = SpecialPage::getTitleFor( 'Log', $this->type ); |
| 85 | + $rcComment = $this->getRcComment(); |
| 86 | + RecentChange::notifyLog( $now, $titleObj, $this->doer, $rcComment, '', $this->type, |
| 87 | + $this->action, $this->target, $this->comment, $this->params, $newId ); |
91 | 88 | } else if( $this->sendToUDP ) { |
92 | 89 | # Notify external application via UDP. |
93 | 90 | # We send this to IRC but do not want to add it the RC table. |