Merge "Fix the (un)watch token to include the namespace name."
[lhc/web/wiklou.git] / includes / installer / WebInstallerOutput.php
index d81111b..174120f 100644 (file)
@@ -124,6 +124,11 @@ class WebInstallerOutput {
         * @return string
         */
        public function getCSS() {
+               // Horrible, horrible hack: the installer is currently hardcoded to use the Vector skin, so load
+               // it here. Include instead of require, as this will work without it, it will just look bad.
+               global $wgStyleDirectory;
+               include_once "$wgStyleDirectory/Vector/Vector.php";
+
                $moduleNames = array(
                        // See SkinTemplate::setupSkinUserCss
                        'mediawiki.legacy.shared',
@@ -146,6 +151,10 @@ class WebInstallerOutput {
                foreach ( $moduleNames as $moduleName ) {
                        /** @var ResourceLoaderFileModule $module */
                        $module = $resourceLoader->getModule( $moduleName );
+                       // One of the modules will be missing if Vector is unavailable
+                       if ( !$module ) {
+                               continue;
+                       }
 
                        // Based on: ResourceLoaderFileModule::getStyles (without the DB query)
                        $styles = ResourceLoader::makeCombinedStyles( $module->readStyleFiles(