From: Trevor Parscal Date: Mon, 6 Jul 2009 22:51:45 +0000 (+0000) Subject: Actually resolves namespaces and tabs having the correct XML IDs X-Git-Tag: 1.31.0-rc.0~41087 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=dc4b011151f70a235ffe55e7ec69a26ded2ee52d;p=lhc%2Fweb%2Fwiklou.git Actually resolves namespaces and tabs having the correct XML IDs --- 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 ); } } }