* @param string $type One of '', 'block', 'protect', 'rights', 'delete',
* 'upload', 'move'
* @param bool $rc Whether to update recent changes as well as the logging table
- * @param bool $udp Whether to send to the UDP feed if not to RC
+ * @param bool $udp Whether to send to the UDP feed if NOT sent to RC
*/
- public function __construct( $type, $rc = true, $udp = 'UDP' ) {
+ public function __construct( $type, $rc = true, $udp = 'skipUDP' ) {
$this->type = $type;
$this->updateRecentChanges = $rc;
$this->sendToUDP = ($udp == 'UDP');
}
# Notify external application via UDP.
# We send this to IRC but do not want to add it the RC table.
- global $wgRC2UDPAddress, $wgRC2UDPOmitBots;
$titleObj = SpecialPage::getTitleFor( 'Log', $this->type );
$rc = RecentChange::newLogEntry( $now, $titleObj, $this->doer, $this->getRcComment(), '',
$this->type, $this->action, $this->target, $this->comment, $this->params, $newId );
- if( $wgRC2UDPAddress && ( !$rc->getAttribute('rc_bot') || !$wgRC2UDPOmitBots ) ) {
- RecentChange::sendToUDP( $rc->getIRCLine() );
- }
+ $rc->notifyRC2UDP();
}
return true;
}
} else if ( $type == 'protect' && count($params) == 3 ) {
$details .= " {$params[1]}"; // restrictions and expiries
if( $params[2] ) {
- $details .= ' ['.wfMsg('protect-summary-cascade').']';
+ if ( $skin ) {
+ $details .= ' ['.wfMsg('protect-summary-cascade').']';
+ } else {
+ $details .= ' ['.wfMsgForContent('protect-summary-cascade').']';
+ }
}
} else if ( $type == 'move' && count( $params ) == 3 ) {
if( $params[2] ) {
- $details .= ' [' . wfMsg( 'move-redirect-suppressed' ) . ']';
+ if ( $skin ) {
+ $details .= ' [' . wfMsg( 'move-redirect-suppressed' ) . ']';
+ } else {
+ $details .= ' [' . wfMsgForContent( 'move-redirect-suppressed' ) . ']';
+ }
}
}
$rv = wfMsgReal( $wgLogActions[$key], $params, true, !$skin ) . $details;