From: umherirrender Date: Sat, 31 Oct 2015 12:49:11 +0000 (+0100) Subject: Load 'mediawiki.page.gallery.styles' also without javascript X-Git-Tag: 1.31.0-rc.0~9158 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=0c3a9674cf5bbf5ed44572f0eecf5ecefa69a3be;p=lhc%2Fweb%2Fwiklou.git Load 'mediawiki.page.gallery.styles' also without javascript Using OutputPage::addModules lets the style loaded over javascript Using OutputPage::addModuleStyles forces loading over css Follows I32697c2c65824d7622c1840330d6074ebb68b488 Bug: T117328 Change-Id: I3ddf105d180336b6eb7ae31286221151055e649f --- diff --git a/includes/gallery/TraditionalImageGallery.php b/includes/gallery/TraditionalImageGallery.php index 0934f6aa09..181c7b8e08 100644 --- a/includes/gallery/TraditionalImageGallery.php +++ b/includes/gallery/TraditionalImageGallery.php @@ -46,12 +46,13 @@ class TraditionalImageGallery extends ImageGalleryBase { array( 'class' => 'gallery mw-gallery-' . $this->mMode ), $this->mAttribs ); $modules = $this->getModules(); - $modules[] = 'mediawiki.page.gallery.styles'; if ( $this->mParser ) { $this->mParser->getOutput()->addModules( $modules ); + $this->mParser->getOutput()->addModuleStyles( 'mediawiki.page.gallery.styles' ); } else { $this->getOutput()->addModules( $modules ); + $this->getOutput()->addModuleStyles( 'mediawiki.page.gallery.styles' ); } $output = Xml::openElement( 'ul', $attribs ); if ( $this->mCaption ) {