* texvc now supports \bcancel and \xcancel in addition to \cancel and \cancelto
* Added scriptExtension setting to $wgForeignFileRepos
* ForeignApiRepo uses scriptDirUrl if apiBase not set
+* (bug 24212) Added MediaWiki:ImagePage.css which is also included on foreign
+ client wikis.
=== Bug fixes in 1.17 ===
* (bug 17560) Half-broken deletion moved image files to deletion archive
$wgOut->addHTML(
"<script type=\"text/javascript\">attachMetadataToggle('mw_metadata', '$expand', '$collapse');</script>\n" );
}
+
+ $css = $this->repo->getDescriptionStylesheetUrl();
+ if ( $css ) {
+ $wgOut->addStyle( $css );
+ }
}
public function getRedirectTarget() {
'class' => 'LocalRepo',
'name' => 'local',
'directory' => $wgUploadDirectory,
+ 'scriptDirUrl' => $wgScriptPath,
+ 'scriptExtension' => $wgScriptExtension,
'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,
'hashLevels' => $wgHashedUploadDirectory ? 2 : 0,
'thumbScriptUrl' => $wgThumbnailScriptPath,
// Per-site custom styles
if( $wgUseSiteCss ) {
global $wgHandheldStyle;
- $query = wfArrayToCGI( array(
- 'usemsgcache' => 'yes',
- 'ctype' => 'text/css',
- 'smaxage' => $wgSquidMaxage
- ) + $siteargs );
+ $query = wfArrayToCGI( self::getDynamicStylesheetQuery() );
# Site settings must override extension css! (bug 15025)
$out->addStyle( self::makeNSUrl( 'Common.css', $query, NS_MEDIAWIKI ) );
$out->addStyle( self::makeNSUrl( 'Print.css', $query, NS_MEDIAWIKI ), 'print' );
wfProfileOut( __METHOD__ );
}
+
+ /**
+ * Get the query to generate a dynamic stylesheet
+ *
+ * @return array
+ */
+ public static function getDynamicStylesheetQuery() {
+ global $wgSquidMaxage;
+ return array(
+ 'action' => 'raw',
+ 'maxage' => $wgSquidMaxage,
+ 'usemsgcache' => 'yes',
+ 'ctype' => 'text/css',
+ 'smaxage' => $wgSquidMaxage,
+ );
+ }
/**
* Add skin specific stylesheets
}
}
}
+
+ /**
+ * Get the URL of the stylesheet to apply to description pages
+ * @return string
+ */
+ function getDescriptionStylesheetUrl() {
+ if ( $this->scriptDirUrl ) {
+ return self::makeUrl( 'title=MediaWiki:ImagePage.css&' .
+ wfArrayToCGI( Skin::getDynamicStylesheetQuery() ) );
+ }
+ }
/**
* Store a file to a given destination.