Merge "Make sure to use array_values for group names in user-rights notifications"

This commit is contained in:
jenkins-bot 2016-02-02 07:18:33 +00:00 committed by Gerrit Code Review
commit 0231c6e000

View file

@ -11,8 +11,8 @@ class EchoUserRightsPresentationModel extends EchoEventPresentationModel {
public function getHeaderMessage() { public function getHeaderMessage() {
list( $formattedName, $genderName ) = $this->getAgentForOutput(); list( $formattedName, $genderName ) = $this->getAgentForOutput();
$add = $this->getLocalizedGroupNames( $this->event->getExtraParam( 'add', array() ) ); $add = $this->getLocalizedGroupNames( array_values( $this->event->getExtraParam( 'add', array() ) ) );
$remove = $this->getLocalizedGroupNames( $this->event->getExtraParam( 'remove', array() ) ); $remove = $this->getLocalizedGroupNames( array_values( $this->event->getExtraParam( 'remove', array() ) ) );
if ( $add && !$remove ) { if ( $add && !$remove ) {
$msg = $this->msg( 'notification-header-user-rights-add-only' ); $msg = $this->msg( 'notification-header-user-rights-add-only' );
$msg->params( $genderName ); $msg->params( $genderName );