Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/248901

Change subject: Require $user parameter in DataOutputFormatter::formatOutput()
......................................................................

Require $user parameter in DataOutputFormatter::formatOutput()

All callers already pass it.

Change-Id: Ic99893f53d6379a3fbbc2a45193e6804264ff7b7
---
M includes/DataOutputFormatter.php
1 file changed, 2 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/01/248901/1

diff --git a/includes/DataOutputFormatter.php b/includes/DataOutputFormatter.php
index 01d62d1..bee304e 100644
--- a/includes/DataOutputFormatter.php
+++ b/includes/DataOutputFormatter.php
@@ -17,18 +17,13 @@
         *
         * @param EchoNotification $notification
         * @param string|bool $format specifify output format, false to not 
format any notifications
-        * @param User|null $user the target user viewing the notification
+        * @param User $user the target user viewing the notification
         * @return array
         */
-       public static function formatOutput( EchoNotification $notification, 
$format = false, User $user = null ) {
+       public static function formatOutput( EchoNotification $notification, 
$format = false, User $user ) {
                $event = $notification->getEvent();
                $timestamp = $notification->getTimestamp();
                $utcTimestampUnix = wfTimestamp( TS_UNIX, $timestamp );
-
-               // Default to notification user if user is not specified
-               if ( !$user ) {
-                       $user = $notification->getUser();
-               }
 
                if ( $notification->getBundleBase() && 
$notification->getBundleDisplayHash() ) {
                        $event->setBundleHash( 
$notification->getBundleDisplayHash() );

-- 
To view, visit https://gerrit.wikimedia.org/r/248901
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic99893f53d6379a3fbbc2a45193e6804264ff7b7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to