/** @var string Inline CSS styles. Use addInlineStyle() sparingly */
protected $mInlineStyles = '';
- /** @todo Unused? */
- private $mLinkColours;
-
/**
* @var string Used by skin template.
* Example: $tpl->set( 'displaytitle', $out->mPageLinkTitle );
* - "list-contains=$XXX" varies on whether the header value as a
* comma-separated list contains $XXX as one of the list items.
*/
- public function addVaryHeader( $header, $option = null ) {
+ public function addVaryHeader( $header, array $option = null ) {
if ( !array_key_exists( $header, $this->mVaryHeader ) ) {
- $this->mVaryHeader[$header] = (array)$option;
- } elseif ( is_array( $option ) ) {
- if ( is_array( $this->mVaryHeader[$header] ) ) {
- $this->mVaryHeader[$header] = array_merge( $this->mVaryHeader[$header], $option );
- } else {
- $this->mVaryHeader[$header] = $option;
- }
+ $this->mVaryHeader[$header] = array();
+ }
+ if ( !is_array( $option ) ) {
+ $option = array();
}
- $this->mVaryHeader[$header] = array_unique( (array)$this->mVaryHeader[$header] );
+ $this->mVaryHeader[$header] = array_unique( array_merge( $this->mVaryHeader[$header], $option ) );
}
/**
// Automatically select style/script elements
if ( $only === ResourceLoaderModule::TYPE_STYLES ) {
- $media = $group === 'print' ? 'print' : 'all';
- $link = Html::linkedStyle( $url, $media );
+ $link = Html::linkedStyle( $url );
} else {
if ( $context->getRaw() || $isRaw ) {
// Startup module can't load itself, needs to use <script> instead of mw.loader.load
$themes = ExtensionRegistry::getInstance()->getAttribute( 'SkinOOUIThemes' );
// Make keys (skin names) lowercase for case-insensitive matching.
$themes = array_change_key_case( $themes, CASE_LOWER );
- $theme = isset( $themes[ $skinName ] ) ? $themes[ $skinName ] : 'MediaWiki';
+ $theme = isset( $themes[$skinName] ) ? $themes[$skinName] : 'MediaWiki';
// For example, 'OOUI\MediaWikiTheme'.
$themeClass = "OOUI\\{$theme}Theme";
OOUI\Theme::setSingleton( new $themeClass() );