Merge "API: Use message-per-value for apihelp-query+linkshere-param-prop"
[lhc/web/wiklou.git] / includes / skins / SkinTemplate.php
index d7e0132..a1844a8 100644 (file)
@@ -51,12 +51,16 @@ class SkinTemplate extends Skin {
         * @param OutputPage $out
         */
        function setupSkinUserCss( OutputPage $out ) {
-               $out->addModuleStyles( array(
+               $moduleStyles = array(
                        'mediawiki.legacy.shared',
                        'mediawiki.legacy.commonPrint',
                        'mediawiki.ui.button',
                        'mediawiki.sectionAnchor'
-               ) );
+               );
+               if ( $out->isSyndicated() ) {
+                       $moduleStyles[] = 'mediawiki.feedlink';
+               }
+               $out->addModuleStyles( $moduleStyles );
        }
 
        /**
@@ -421,11 +425,15 @@ class SkinTemplate extends Skin {
                $realBodyAttribs = array( 'id' => 'mw-content-text' );
 
                # Add a mw-content-ltr/rtl class to be able to style based on text direction
-               # when the content is different from the UI language
-               $pageLang = $title->getPageViewLanguage();
-               $realBodyAttribs['lang'] = $pageLang->getHtmlCode();
-               $realBodyAttribs['dir'] = $pageLang->getDir();
-               $realBodyAttribs['class'] = 'mw-content-' . $pageLang->getDir();
+               # when the content is different from the UI language, i.e.:
+               # not for special pages or file pages AND only when viewing
+               if ( !in_array( $title->getNamespace(), array( NS_SPECIAL, NS_FILE ) ) &&
+                       Action::getActionName( $this ) === 'view' ) {
+                       $pageLang = $title->getPageViewLanguage();
+                       $realBodyAttribs['lang'] = $pageLang->getHtmlCode();
+                       $realBodyAttribs['dir'] = $pageLang->getDir();
+                       $realBodyAttribs['class'] = 'mw-content-' . $pageLang->getDir();
+               }
 
                $out->mBodytext = Html::rawElement( 'div', $realBodyAttribs, $out->mBodytext );
                $tpl->setRef( 'bodytext', $out->mBodytext );
@@ -1072,6 +1080,7 @@ class SkinTemplate extends Skin {
                                        $xmlID = 'ca-nstab-' . $xmlID;
                                } elseif ( isset( $link['context'] ) && $link['context'] == 'talk' ) {
                                        $xmlID = 'ca-talk';
+                                       $link['rel'] = 'discussion';
                                } elseif ( $section == 'variants' ) {
                                        $xmlID = 'ca-varlang-' . $xmlID;
                                } else {