From: Roan Kattouw Date: Tue, 20 Sep 2011 09:13:41 +0000 (+0000) Subject: Accept ResourceLoader URLs containing '!' in '.' for backwards compatibility with... X-Git-Tag: 1.31.0-rc.0~27538 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=7ef9760879ff96881acf45f637541ee9593b4dc2;p=lhc%2Fweb%2Fwiklou.git Accept ResourceLoader URLs containing '!' in '.' for backwards compatibility with a hack that existed in MediaWiki at some point (was in trunk and 1.17wmf1 but never in any release). This is needed because Squid-cached HTML at Wikimedia still contains such URLs. --- diff --git a/includes/resourceloader/ResourceLoaderContext.php b/includes/resourceloader/ResourceLoaderContext.php index b7312e00b2..7e70713505 100644 --- a/includes/resourceloader/ResourceLoaderContext.php +++ b/includes/resourceloader/ResourceLoaderContext.php @@ -73,6 +73,8 @@ class ResourceLoaderContext { */ public static function expandModuleNames( $modules ) { $retval = array(); + // For backwards compatibility with an earlier hack, replace ! with . + $modules = str_replace( '!', '.', $modules ); $exploded = explode( '|', $modules ); foreach ( $exploded as $group ) { if ( strpos( $group, ',' ) === false ) {