From: Timo Tijhof Date: Tue, 16 Jun 2015 21:14:10 +0000 (+0100) Subject: resourceloader: Run ResourceLoaderRegisterModules after wgResourceModules X-Git-Tag: 1.31.0-rc.0~9947^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=926a83a07d6bf29965fd56008cb0df68c959e4ea;hp=926a83a07d6bf29965fd56008cb0df68c959e4ea;p=lhc%2Fweb%2Fwiklou.git resourceloader: Run ResourceLoaderRegisterModules after wgResourceModules We don't allow modifying existing modules or registering the same module twice. We do have an established convention of registering plugins for optional dependencies conditionally. E.g. - VisualEditor should only register 'uls.data' if ULS extension isn't installed. - The Math extension should only register its VE plugin if VE is installed. Typically the dependency being checked is registered unconditionally. The conditional one is the supplemental one in case the canonical source within the MediaWiki landscape is absent. Currently this means code will check both isModuleRegistered() and the global $wgResourceModules. This doesn't make sense. Reverse this so that the unconditional registry is processed first, and the programmatic one after. This also helps exceptions come from a more sensible place in case of a duplicate registration. Change-Id: Ib2d01c88511ade75a97b2509bccfabb1a4cc5c15 ---