Split BitmapHandler into two classes.
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderStartUpModule.php
index 78fe45c..78fe8e0 100644 (file)
@@ -94,7 +94,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        'wgDBname' => $conf->get( 'DBname' ),
                        // This sucks, it is only needed on Special:Upload, but I could
                        // not find a way to add vars only for a certain module
-                       'wgFileCanRotate' => BitmapHandler::canRotate(),
+                       'wgFileCanRotate' => SpecialUpload::rotationEnabled(),
                        'wgAvailableSkins' => Skin::getSkinNames(),
                        'wgExtensionAssetsPath' => $conf->get( 'ExtensionAssetsPath' ),
                        // MediaWiki sets cookies to have this prefix by default
@@ -207,6 +207,13 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                                continue;
                        }
 
+                       if ( $module->isRaw() ) {
+                               // Don't register "raw" modules (like 'jquery' and 'mediawiki') client-side because
+                               // depending on them is illegal anyway and would only lead to them being reloaded
+                               // causing any state to be lost (like jQuery plugins, mw.config etc.)
+                               continue;
+                       }
+
                        // getModifiedTime() is supposed to return a UNIX timestamp, but it doesn't always
                        // seem to do that, and custom implementations might forget. Coerce it to TS_UNIX
                        $moduleMtime = wfTimestamp( TS_UNIX, $module->getModifiedTime( $context ) );