jenkins-bot has submitted this change and it was merged.

Change subject: Don't pollute $GLOBALS in Resources.php
......................................................................


Don't pollute $GLOBALS in Resources.php

Get rid of $mobileReadyTemplate, it's only used once now, and unset
$echoResourceTemplate after usage.

Change-Id: Ie371a6c1545383b8be1c0b99730228da6e381650
---
M Resources.php
1 file changed, 4 insertions(+), 5 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Resources.php b/Resources.php
index 58ad000..a3dc042 100644
--- a/Resources.php
+++ b/Resources.php
@@ -29,13 +29,9 @@
        'remoteExtPath' => 'Echo/modules',
 );
 
-$mobileReadyTemplate = array(
-       'targets' => array( 'desktop', 'mobile' ),
-);
-
 $wgResourceModules += array(
        // ext.echo.base is registered in 
EchoHooks::onResourceLoaderRegisterModules
-       'ext.echo.overlay' => $echoResourceTemplate + $mobileReadyTemplate + 
array(
+       'ext.echo.overlay' => $echoResourceTemplate + array(
                'scripts' => array(
                        'overlay/ext.echo.overlay.js',
                ),
@@ -62,6 +58,7 @@
                        'echo-notification-message-text-only',
                        'echo-email-batch-bullet'
                ),
+               'targets' => array( 'desktop', 'mobile' ),
        ),
        'ext.echo.overlay.init' => $echoResourceTemplate + array(
                'styles' => array(
@@ -107,3 +104,5 @@
                ),
        ),
 );
+
+unset( $echoResourceTemplate );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie371a6c1545383b8be1c0b99730228da6e381650
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to