Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -129,6 +129,7 @@ |
130 | 130 | namespaces (categories) when combined with $wgRawHtml. |
131 | 131 | * Use content language in formatting of dates in revertpage message |
132 | 132 | (rollback revert edit summary) and do not adjust for user timezone. |
| 133 | +* (bug 29277) MediaWiki:Filepage.css is also shown on the local wiki |
133 | 134 | |
134 | 135 | === API changes in 1.19 === |
135 | 136 | * BREAKING CHANGE: action=watch now requires POST and token. |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -12,6 +12,9 @@ |
13 | 13 | */ |
14 | 14 | private $img; |
15 | 15 | private $displayImg; |
| 16 | + /** |
| 17 | + * @var FileRepo |
| 18 | + */ |
16 | 19 | private $repo; |
17 | 20 | private $fileLoaded; |
18 | 21 | |
— | — | @@ -161,11 +164,16 @@ |
162 | 165 | $wgOut->addWikiText( $this->makeMetadataTable( $formattedMetadata ) ); |
163 | 166 | $wgOut->addModules( array( 'mediawiki.action.view.metadata' ) ); |
164 | 167 | } |
165 | | - |
166 | | - $css = $this->repo->getDescriptionStylesheetUrl(); |
167 | | - if ( $css ) { |
168 | | - $wgOut->addStyle( $css ); |
| 168 | + |
| 169 | + // Add remote Filepage.css |
| 170 | + if( !$this->repo->isLocal() ) { |
| 171 | + $css = $this->repo->getDescriptionStylesheetUrl(); |
| 172 | + if ( $css ) { |
| 173 | + $wgOut->addStyle( $css ); |
| 174 | + } |
169 | 175 | } |
| 176 | + // always show the local local Filepage.css, bug 29277 |
| 177 | + $wgOut->addModuleStyles( 'filepage' ); |
170 | 178 | } |
171 | 179 | |
172 | 180 | public function getRedirectTarget() { |
Index: trunk/phase3/includes/resourceloader/ResourceLoaderFilePageModule.php |
— | — | @@ -0,0 +1,11 @@ |
| 2 | +<?php |
| 3 | +/* |
| 4 | + * ResourceLoader definition for MediaWiki:Filepage.css |
| 5 | + */ |
| 6 | +class ResourceLoaderFilePageModule extends ResourceLoaderWikiModule { |
| 7 | + protected function getPages( ResourceLoaderContext $context ) { |
| 8 | + return array( |
| 9 | + 'MediaWiki:Filepage.css' => array( 'type' => 'style' ), |
| 10 | + ); |
| 11 | + } |
| 12 | +} |
Property changes on: trunk/phase3/includes/resourceloader/ResourceLoaderFilePageModule.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 13 | + native |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -635,6 +635,7 @@ |
636 | 636 | 'ResourceLoader' => 'includes/resourceloader/ResourceLoader.php', |
637 | 637 | 'ResourceLoaderContext' => 'includes/resourceloader/ResourceLoaderContext.php', |
638 | 638 | 'ResourceLoaderFileModule' => 'includes/resourceloader/ResourceLoaderFileModule.php', |
| 639 | + 'ResourceLoaderFilePageModule' => 'includes/resourceloader/ResourceLoaderFilePageModule.php', |
639 | 640 | 'ResourceLoaderModule' => 'includes/resourceloader/ResourceLoaderModule.php', |
640 | 641 | 'ResourceLoaderNoscriptModule' => 'includes/resourceloader/ResourceLoaderNoscriptModule.php', |
641 | 642 | 'ResourceLoaderSiteModule' => 'includes/resourceloader/ResourceLoaderSiteModule.php', |
Index: trunk/phase3/resources/Resources.php |
— | — | @@ -11,6 +11,7 @@ |
12 | 12 | 'user.groups' => array( 'class' => 'ResourceLoaderUserGroupsModule' ), |
13 | 13 | 'user.options' => array( 'class' => 'ResourceLoaderUserOptionsModule' ), |
14 | 14 | 'user.tokens' => array( 'class' => 'ResourceLoaderUserTokensModule' ), |
| 15 | + 'filepage' => array( 'class' => 'ResourceLoaderFilePageModule' ), |
15 | 16 | |
16 | 17 | /* Skins */ |
17 | 18 | |