Matěj Grabovský has uploaded a new change for review. https://gerrit.wikimedia.org/r/134872
Change subject: (bug 63198) Add rel=discussion to talkpage tabs ...................................................................... (bug 63198) Add rel=discussion to talkpage tabs Also fix rel=archives not appearing for history link Change-Id: Ifd1a7333c7b657d74860d206ea5b82d29bf97851 --- M RELEASE-NOTES-1.24 M includes/SkinTemplate.php M skins/Vector.php 3 files changed, 17 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/72/134872/1 diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index fb23b71..a40c07c 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -43,6 +43,7 @@ non-landscape thumbnails. === Bug fixes in 1.24 === +* (bug 63198) Add rel=discussion to talkpage and rel=archives to history tabs * (bug 49116) Footer copyright notice is now always displayed in user language rather than content language (same as copyright notice for editing interface). * (bug 62258) A bug was fixed in File::getUnscaledThumb when a height diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index cf8b3fc..99baf2d 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -1178,6 +1178,7 @@ $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 { diff --git a/skins/Vector.php b/skins/Vector.php index 35861c2..d9c9309 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -118,25 +118,25 @@ } $xmlID = ''; - foreach ( $nav as $section => $links ) { - foreach ( $links as $key => $link ) { + foreach ( $nav as $section => &$links ) { + foreach ( $links as $key => &$link ) { if ( $section == 'views' && !( isset( $link['primary'] ) && $link['primary'] ) ) { $link['class'] = rtrim( 'collapsible ' . $link['class'], ' ' ); } $xmlID = isset( $link['id'] ) ? $link['id'] : 'ca-' . $xmlID; - $nav[$section][$key]['attributes'] = + $link['attributes'] = ' id="' . Sanitizer::escapeId( $xmlID ) . '"'; if ( $link['class'] ) { - $nav[$section][$key]['attributes'] .= + $link['attributes'] .= ' class="' . htmlspecialchars( $link['class'] ) . '"'; - unset( $nav[$section][$key]['class'] ); + unset( $link['class'] ); } if ( isset( $link['tooltiponly'] ) && $link['tooltiponly'] ) { - $nav[$section][$key]['key'] = + $link['key'] = Linker::tooltip( $xmlID ); } else { - $nav[$section][$key]['key'] = + $link['key'] = Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( $xmlID ) ); } } @@ -459,7 +459,10 @@ ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php - echo $link['key'] + echo $link['key']; + if ( isset( $link['rel'] ) ) { + echo ' rel="' . $link['rel'] . '"'; + } ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></span></li> @@ -542,7 +545,10 @@ ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php - echo $link['key'] + echo $link['key']; + if ( isset( $link['rel'] ) ) { + echo ' rel="' . $link['rel'] . '"'; + } ?>><?php // $link['text'] can be undefined - bug 27764 if ( array_key_exists( 'text', $link ) ) { -- To view, visit https://gerrit.wikimedia.org/r/134872 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd1a7333c7b657d74860d206ea5b82d29bf97851 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matěj Grabovský <mgrabov...@yahoo.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits