From 4380e81afeada82f0ccd12d31a9c00dcdd89fad1 Mon Sep 17 00:00:00 2001 From: kaldari Date: Wed, 25 Sep 2013 10:52:58 -0700 Subject: [PATCH] Moving dependencies from ext.echo.base to more specific modules mediawiki.api and mediawiki.Uri are desktop-only modules that are not actually needed by ext.echo.base. Moving the dependency declarations to more specific modules so that ext.echo.base is usable by mobile notifications. ResourceLoader is smart enough to not double-load them, so there should be no performance difference. Also removing unused 'cancel' message. Change-Id: I9fa8c4501e038ded9125c3b43e5207c355af2db9 --- Echo.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Echo.php b/Echo.php index 0284517c6..29d78ced7 100644 --- a/Echo.php +++ b/Echo.php @@ -141,15 +141,12 @@ $echoResourceTemplate = array( ); $wgResourceModules += array( + // ext.echo.base is used by mobile notifications as well, so be sure not to add any + // dependencies that do not target mobile. 'ext.echo.base' => $echoResourceTemplate + array( 'styles' => 'base/ext.echo.base.css', 'scripts' => 'base/ext.echo.base.js', - 'dependencies' => array( - 'mediawiki.api', - 'mediawiki.Uri', - ), 'messages' => array( - 'cancel', 'echo-error-preference', 'echo-error-token', ), @@ -166,6 +163,8 @@ $wgResourceModules += array( ), 'dependencies' => array( 'ext.echo.base', + 'mediawiki.api', + 'mediawiki.Uri', 'mediawiki.util', 'mediawiki.jqueryMsg', 'mediawiki.user', @@ -187,6 +186,8 @@ $wgResourceModules += array( 'styles' => 'special/ext.echo.special.css', 'dependencies' => array( 'ext.echo.base', + 'mediawiki.api', + 'mediawiki.Uri', 'mediawiki.ui', 'mediawiki.jqueryMsg', 'mediawiki.user',