From dc4b011151f70a235ffe55e7ec69a26ded2ee52d Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Mon, 6 Jul 2009 22:51:45 +0000 Subject: [PATCH] Actually resolves namespaces and tabs having the correct XML IDs --- skins/Vector.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/skins/Vector.php b/skins/Vector.php index 1a5d5862fd..1558fe4f5e 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -373,17 +373,18 @@ class VectorTemplate extends QuickTemplate { $nav = $this->skin->buildNavigationUrls(); foreach ( $nav as $section => $links ) { foreach ( $links as $key => $link ) { - $insert = ''; + $xmlID = $key; if ( isset( $link['context'] ) ) { if ( $link['context'] == 'subject' ) { - $insert = 'nstab-'; - } - if ( $link['context'] == 'talk' ) { - $key = 'talk'; + $xmlID = 'ca-nstab-' . $xmlID; + } else if ( $link['context'] == 'talk' ) { + $xmlID = 'ca-talk'; + } else { + $xmlID = 'ca-' . $xmlID; } } $nav[$section][$key]['attributes'] = - ' id="' . Sanitizer::escapeId( "ca-{$insert}{$key}" ) . '"'; + ' id="' . Sanitizer::escapeId( $xmlID ) . '"'; if ( $nav[$section][$key]['class'] ) { $nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars( $link['class'] ) . '"'; @@ -398,10 +399,10 @@ class VectorTemplate extends QuickTemplate { in_array( $key, array( 'edit', 'watch', 'unwatch' ) ) ) { $nav[$section][$key]['key'] = - $this->skin->tooltip( "ca-{$insert}{$key}" ); + $this->skin->tooltip( $xmlID ); } else { $nav[$section][$key]['key'] = - $this->skin->tooltipAndAccesskey( "ca-{$insert}{$key}" ); + $this->skin->tooltipAndAccesskey( $xmlID ); } } } -- 2.20.1