From 67ae58aa757b1b38c918eea88d2c49836f340802 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 6 Aug 2015 17:44:38 -0700 Subject: [PATCH] resourceloader: Restore anticipated loader states for hardcoded module requests Follows-up Icba6d7a87b2 which removed this code in the assumption that they're now taken care of by mw.loader.load. While that is the case, they are still in the HTML and when earlier modules require these modules the loader should not initiate a separate request. This was especially problematic for the 'user' module which mw.loader was requesting with a version from the startup module which is not associated with the current user. This would've caused edits to a user's personal scripts post-Icba6d7a87b2 to not propagate correctly. The second request would be ignored by mw.loader since it implements a module that is already implemented. This only affected wikis that were manually depending on the 'user' module from Common.js or a default-loaded gadget. Bug: T108275 Change-Id: I1b863a3ee23191adaf34f66b58973618487118b2 --- includes/OutputPage.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index dd7b90a3ce..72d8a7c417 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2923,6 +2923,15 @@ class OutputPage extends ContextSource { Xml::encodeJsCall( 'mw.loader.load', array( $url ) ) ); } + + // For modules requested directly in the html via