From 7ef9760879ff96881acf45f637541ee9593b4dc2 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 20 Sep 2011 09:13:41 +0000 Subject: [PATCH] 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. --- includes/resourceloader/ResourceLoaderContext.php | 2 ++ 1 file changed, 2 insertions(+) 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 ) { -- 2.20.1