From: Trevor Parscal Date: Tue, 15 Feb 2011 22:14:03 +0000 (+0000) Subject: Grouped diff and history modules together to help reduce cache invalidation. Loaded... X-Git-Tag: 1.31.0-rc.0~31983 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=a8b81f9a8d15ea7f500895abcf7d1aa184355834;p=lhc%2Fweb%2Fwiklou.git Grouped diff and history modules together to help reduce cache invalidation. Loaded diff styles statically. This should help with bug #27418, but I suspect there are more cases where we need to do this sort of thing before the bug is truly resolved. --- diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index a2ca73f5fe..d73735d0b4 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -584,7 +584,8 @@ CONTROL; */ function showDiffStyle() { global $wgOut; - $wgOut->addModules( 'mediawiki.legacy.diff' ); + $wgOut->addModuleStyles( 'mediawiki.legacy.diff' ); + $wgOut->addModuleScripts( 'mediawiki.legacy.diff' ); } /** diff --git a/resources/Resources.php b/resources/Resources.php index 4e9d6b2829..553c8ae08e 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -399,6 +399,7 @@ return array( 'mediawiki.action.history' => array( 'scripts' => 'resources/mediawiki.action/mediawiki.action.history.js', 'dependencies' => 'mediawiki.legacy.history', + 'group' => 'mediawiki.action.history', ), 'mediawiki.action.edit' => array( 'scripts' => 'resources/mediawiki.action/mediawiki.action.edit.js', @@ -522,6 +523,7 @@ return array( 'mediawiki.legacy.diff' => array( 'scripts' => 'common/diff.js', 'styles' => 'common/diff.css', + 'group' => 'mediawiki.action.history', 'remoteBasePath' => $GLOBALS['wgStylePath'], 'localBasePath' => "{$GLOBALS['IP']}/skins", 'dependencies' => 'mediawiki.legacy.wikibits', @@ -534,6 +536,7 @@ return array( ), 'mediawiki.legacy.history' => array( 'scripts' => 'common/history.js', + 'group' => 'mediawiki.action.history', 'remoteBasePath' => $GLOBALS['wgStylePath'], 'localBasePath' => "{$GLOBALS['IP']}/skins", 'dependencies' => 'mediawiki.legacy.wikibits',