Merge "Implement a getter/setter for mCategoryViewerClass"
[lhc/web/wiklou.git] / includes / OutputPage.php
index e22f42c..969171d 100644 (file)
@@ -295,7 +295,7 @@ class OutputPage extends ContextSource {
        private $mEnableSectionEditLinks = true;
 
        /**
-        * @var string|null The URL to send in a <link> element with rel=copyright
+        * @var string|null The URL to send in a <link> element with rel=license
         */
        private $copyrightUrl;
 
@@ -3446,7 +3446,7 @@ class OutputPage extends ContextSource {
 
                if ( $copyright ) {
                        $tags['copyright'] = Html::element( 'link', [
-                               'rel' => 'copyright',
+                               'rel' => 'license',
                                'href' => $copyright ]
                        );
                }
@@ -3952,12 +3952,10 @@ class OutputPage extends ContextSource {
         * @param String $skinName The Skin name to determine the correct OOUI theme
         * @param String $dir Language direction
         */
-       public static function setupOOUI( $skinName = '', $dir = 'ltr' ) {
-               $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';
-               // For example, 'OOUI\MediaWikiTheme'.
+       public static function setupOOUI( $skinName = 'default', $dir = 'ltr' ) {
+               $themes = ResourceLoaderOOUIModule::getSkinThemeMap();
+               $theme = isset( $themes[$skinName] ) ? $themes[$skinName] : $themes['default'];
+               // For example, 'OOUI\WikimediaUITheme'.
                $themeClass = "OOUI\\{$theme}Theme";
                OOUI\Theme::setSingleton( new $themeClass() );
                OOUI\Element::setDefaultDir( $dir );
@@ -3976,10 +3974,12 @@ class OutputPage extends ContextSource {
                );
                $this->addModuleStyles( [
                        'oojs-ui-core.styles',
-                       'oojs-ui.styles.icons',
                        'oojs-ui.styles.indicators',
                        'oojs-ui.styles.textures',
                        'mediawiki.widgets.styles',
+                       'oojs-ui.styles.icons-content',
+                       'oojs-ui.styles.icons-alerts',
+                       'oojs-ui.styles.icons-interactions',
                ] );
        }