r109680 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109679‎ | r109680 | r109681 >
Date:13:31, 21 January 2012
Author:krinkle
Status:ok
Tags:
Comment:
[Resources] Add missing or implied dependencies
* mediawiki.action.watch.ajax:
-- Depends on mediawiki.api.watch>mediawiki.api>mediawiki.util
-- But also uses mw.util itself, so adding it here as well. mw.Api might one day not use mw.util
* mediawiki.special.block: Uses mw.util.isIPv4Address / mw.util.isIPv6Address
* mediawiki.special.changeemail: Uses mw.util.validateEmail
* mediawiki.legacy.upload: Uses mw.util.wikiScript
* Uses mw.util.wikiUrlencode

Commit is inspired by and a superset of the patch provided by Rainer@Rillke.eu at bug 33760.
Modified paths:
  • /trunk/phase3/resources/Resources.php (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/Resources.php
@@ -628,7 +628,10 @@
629629 ),
630630 'mediawiki.action.watch.ajax' => array(
631631 'scripts' => 'resources/mediawiki.action/mediawiki.action.watch.ajax.js',
632 - 'dependencies' => 'mediawiki.api.watch',
 632+ 'dependencies' => array(
 633+ 'mediawiki.api.watch',
 634+ 'mediawiki.util',
 635+ ),
633636 'messages' => array(
634637 'watch',
635638 'unwatch',
@@ -735,11 +738,20 @@
736739 ),
737740 'mediawiki.special.block' => array(
738741 'scripts' => 'resources/mediawiki.special/mediawiki.special.block.js',
 742+ 'dependencies' => array(
 743+ 'mediawiki.util',
 744+ ),
739745 ),
740746 'mediawiki.special.changeemail' => array(
741747 'scripts' => 'resources/mediawiki.special/mediawiki.special.changeemail.js',
742748 'styles' => 'resources/mediawiki.special/mediawiki.special.changeemail.css',
743 - 'messages' => array( 'email-address-validity-valid', 'email-address-validity-invalid' ),
 749+ 'dependencies' => array(
 750+ 'mediawiki.util',
 751+ ),
 752+ 'messages' => array(
 753+ 'email-address-validity-valid',
 754+ 'email-address-validity-invalid',
 755+ ),
744756 ),
745757 'mediawiki.special.changeslist' => array(
746758 'styles' => 'resources/mediawiki.special/mediawiki.special.changeslist.css',
@@ -806,7 +818,10 @@
807819 'scripts' => 'common/ajax.js',
808820 'remoteBasePath' => $GLOBALS['wgStylePath'],
809821 'localBasePath' => $GLOBALS['wgStyleDirectory'],
810 - 'dependencies' => array( 'mediawiki.util', 'mediawiki.legacy.wikibits' ),
 822+ 'dependencies' => array(
 823+ 'mediawiki.util',
 824+ 'mediawiki.legacy.wikibits',
 825+ ),
811826 ),
812827 'mediawiki.legacy.commonPrint' => array(
813828 'styles' => array( 'common/commonPrint.css' => array( 'media' => 'print' ) ),
@@ -862,12 +877,18 @@
863878 'scripts' => 'common/upload.js',
864879 'remoteBasePath' => $GLOBALS['wgStylePath'],
865880 'localBasePath' => $GLOBALS['wgStyleDirectory'],
866 - 'dependencies' => 'mediawiki.legacy.wikibits',
 881+ 'dependencies' => array(
 882+ 'mediawiki.legacy.wikibits',
 883+ 'mediawiki.util',
 884+ ),
867885 ),
868886 'mediawiki.legacy.wikibits' => array(
869887 'scripts' => 'common/wikibits.js',
870888 'remoteBasePath' => $GLOBALS['wgStylePath'],
871889 'localBasePath' => $GLOBALS['wgStyleDirectory'],
 890+ 'dependencies' => array(
 891+ 'mediawiki.util',
 892+ ),
872893 'position' => 'top',
873894 ),
874895 'mediawiki.legacy.wikiprintable' => array(

Status & tagging log