Mattflaschen has uploaded a new change for review.

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


Change subject: Add new $icons parameter to Echo hook:
......................................................................

Add new $icons parameter to Echo hook:

* Update doc block
* Use names that indicate the variables are passed in, not used as globals.

Bug: 46585
Change-Id: I2c8c086fb5f4a6c5618039908fed188522c864c5
---
M PageTriage.hooks.php
1 file changed, 10 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage 
refs/changes/43/61343/1

diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php
index 7a46b23..a657506 100644
--- a/PageTriage.hooks.php
+++ b/PageTriage.hooks.php
@@ -463,21 +463,23 @@
        }
 
        /**
-        * Add extension event to $wgEchoEnabledEvents
-        * @param $wgEchoEnabledEvents array a list of enabled echo events
-        * @param $wgEchoEventDetails array details for echo events
+        * Add PageTriage events to Echo
+        *
+        * @param $notifications array a list of enabled echo events
+        * @param $notificationCategories array details for echo events
+        * @param $icons array of icon details
         */
-       public static function onBeforeCreateEchoEvent( &$wgEchoNotifications, 
&$wgEchoNotificationCategories ) {
+       public static function onBeforeCreateEchoEvent( &$notifications, 
&$notificationCategories, &$icons ) {
                global $wgPageTriageEnabledEchoEvents;
 
                if ( $wgPageTriageEnabledEchoEvents ) {
-                       $wgEchoNotificationCategories['page-review'] = array(
+                       $notificationCategories['page-review'] = array(
                                'priority' => 8,
                        );
                }
 
                if ( in_array( 'pagetriage-mark-as-reviewed', 
$wgPageTriageEnabledEchoEvents ) ) {
-                       $wgEchoNotifications['pagetriage-mark-as-reviewed'] = 
array(
+                       $notifications['pagetriage-mark-as-reviewed'] = array(
                                'category' => 'page-review',
                                'group' => 'neutral',
                                'formatter-class' => 
'PageTriageNotificationFormatter',
@@ -495,7 +497,7 @@
                        );
                }
                if ( in_array( 'pagetriage-add-maintenance-tag', 
$wgPageTriageEnabledEchoEvents ) ) {
-                       $wgEchoNotifications['pagetriage-add-maintenance-tag'] 
= array(
+                       $notifications['pagetriage-add-maintenance-tag'] = 
array(
                                'category' => 'page-review',
                                'group' => 'neutral',
                                'formatter-class' => 
'PageTriageNotificationFormatter',
@@ -513,7 +515,7 @@
                        );
                }
                if ( in_array( 'pagetriage-add-deletion-tag', 
$wgPageTriageEnabledEchoEvents ) ) {
-                       $wgEchoNotifications['pagetriage-add-deletion-tag'] = 
array(
+                       $notifications['pagetriage-add-deletion-tag'] = array(
                                'category' => 'page-review',
                                'group' => 'neutral',
                                'formatter-class' => 
'PageTriageNotificationFormatter',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c8c086fb5f4a6c5618039908fed188522c864c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>

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

Reply via email to