Tweichart has uploaded a new change for review. https://gerrit.wikimedia.org/r/196253
Change subject: notifications + warning fix ...................................................................... notifications + warning fix * fixed warning in pm * changed some echo message calls to actually work Change-Id: I9c65a8a790443bc25f2968c62200f96678eae443 --- M Notifications/Notifications.class.php M Notifications/includes/BsNotificationsFormatter.class.php M PermissionManager/PermissionManager.class.php M ShoutBox/ShoutBox.class.php 4 files changed, 14 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions refs/changes/53/196253/1 diff --git a/Notifications/Notifications.class.php b/Notifications/Notifications.class.php index 4b82a4b..fccb30b 100644 --- a/Notifications/Notifications.class.php +++ b/Notifications/Notifications.class.php @@ -290,11 +290,11 @@ 'flyout-message' => 'bs-notifications-email-addaccount-subject', 'flyout-params' => array( 'userlink' ), 'email-subject-message' => 'bs-notifications-email-addaccount-subject', - 'email-subject-params' => array( 'user' ), + 'email-subject-params' => array( 'username' ), 'email-body-message' => 'bs-notifications-email-addaccount', - 'email-body-params' => array( 'userlink' ), + 'email-body-params' => array( 'userlink', 'username' ), 'email-body-batch-message' => 'bs-notifications-email-addaccount', - 'email-body-batch-params' => array( 'userlink' ), + 'email-body-batch-params' => array( 'userlink','username' ), 'icon' => 'bs-newuser', ); @@ -464,6 +464,7 @@ // TODO SW: implement own notifications formatter 'extra' => array( 'user' => $oUser->getName(), + 'username' => isset($aUserDetails['realname']) ? $aUserDetails['realname'] : $aUserDetails['username'], 'userlink' => true, ) ) ); diff --git a/Notifications/includes/BsNotificationsFormatter.class.php b/Notifications/includes/BsNotificationsFormatter.class.php index 63ead14..df60fb1 100644 --- a/Notifications/includes/BsNotificationsFormatter.class.php +++ b/Notifications/includes/BsNotificationsFormatter.class.php @@ -91,6 +91,10 @@ $aExtra = $event->getExtra(); $sMessage = $aExtra['shoutmsg']; $message->params( $sMessage ); + } else if( $param === 'username' ) { + $aExtra = $event->getExtra(); + $sMessage = $aExtra['username']; + $message->params( $sMessage ); } else { parent::processParam( $event, $param, $message, $user ); } diff --git a/PermissionManager/PermissionManager.class.php b/PermissionManager/PermissionManager.class.php index aa1642d..bd19064 100644 --- a/PermissionManager/PermissionManager.class.php +++ b/PermissionManager/PermissionManager.class.php @@ -344,7 +344,7 @@ ); } $aConfig = $bsgPermissionConfig[$sRight]; - $bGlobalPermission = $aConfig['type'] == 'global' ? true : false; + $bGlobalPermission = (isset($aConfig['type']) && $aConfig['type'] == 'global') ? true : false; $aMetadata[] = array( 'right' => $sRight, 'type' => $bGlobalPermission ? 2 : 1, diff --git a/ShoutBox/ShoutBox.class.php b/ShoutBox/ShoutBox.class.php index b57deee..ca4c60d 100644 --- a/ShoutBox/ShoutBox.class.php +++ b/ShoutBox/ShoutBox.class.php @@ -627,13 +627,14 @@ 'category' => 'bs-shoutbox-mention-cat', 'group' => 'neutral', 'formatter-class' => 'BsNotificationsFormatter', - 'title-message' => 'bs-shoutbox-notifications-title-message-text', - 'title-params' => array( 'agent', 'agentlink', 'titlelink' ), + 'title-message' => 'bs-shoutbox-notifications-title-message-subject', 'flyout-message' => 'bs-shoutbox-notifications-title-message-text', - 'title-params' => array( 'agent', 'agentlink', 'titlelink' ), + 'flyout-params' => array( 'agent', 'agentlink', 'titlelink' ), 'email-subject-message' => 'bs-shoutbox-notifications-title-message-subject', 'email-body-message' => 'bs-shoutbox-notifications-title-message-text', - 'title-params' => array( 'agent', 'agentlink', 'titlelink' ), + 'email-body-params' => array( 'agent', 'agentlink', 'titlelink' ), + 'email-body-batch-message' => 'bs-shoutbox-notifications-title-message-text', + 'email-body-batch-params' => array( 'agent', 'agentlink', 'titlelink' ), ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/196253 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9c65a8a790443bc25f2968c62200f96678eae443 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions Gerrit-Branch: master Gerrit-Owner: Tweichart <weich...@hallowelt.biz> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits