Merge "Add source for event logging"

This commit is contained in:
Bsitu 2013-03-21 19:00:07 +00:00 committed by Gerrit Code Review
commit fae698b083

View file

@ -30,7 +30,6 @@ class EchoNotifier {
} else {
$group = 'neutral';
}
$data = array (
'version' => $wgEchoConfig['version'],
'eventId' => $event->getId(),
@ -40,6 +39,11 @@ class EchoNotifier {
'recipientUserId' => $user->getId(),
'recipientEditCount' => (int)$user->getEditCount()
);
// Add the source if it exists. (This is mostly for the Thanks extension.)
$extra = $event->getExtra();
if ( isset( $extra['source'] ) ) {
$data['eventSource'] = (string)$extra['source'];
}
EchoHooks::logEvent( 'Echo', $data );
}