r52810 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52809‎ | r52810 | r52811 >
Date:22:51, 6 July 2009
Author:tparscal
Status:resolved
Tags:
Comment:
Actually resolves namespaces and tabs having the correct XML IDs
Modified paths:
  • /trunk/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Vector.php
@@ -373,17 +373,18 @@
374374 $nav = $this->skin->buildNavigationUrls();
375375 foreach ( $nav as $section => $links ) {
376376 foreach ( $links as $key => $link ) {
377 - $insert = '';
 377+ $xmlID = $key;
378378 if ( isset( $link['context'] ) ) {
379379 if ( $link['context'] == 'subject' ) {
380 - $insert = 'nstab-';
 380+ $xmlID = 'ca-nstab-' . $xmlID;
 381+ } else if ( $link['context'] == 'talk' ) {
 382+ $xmlID = 'ca-talk';
 383+ } else {
 384+ $xmlID = 'ca-' . $xmlID;
381385 }
382 - if ( $link['context'] == 'talk' ) {
383 - $key = 'talk';
384 - }
385386 }
386387 $nav[$section][$key]['attributes'] =
387 - ' id="' . Sanitizer::escapeId( "ca-{$insert}{$key}" ) . '"';
 388+ ' id="' . Sanitizer::escapeId( $xmlID ) . '"';
388389 if ( $nav[$section][$key]['class'] ) {
389390 $nav[$section][$key]['attributes'] .=
390391 ' class="' . htmlspecialchars( $link['class'] ) . '"';
@@ -398,10 +399,10 @@
399400 in_array( $key, array( 'edit', 'watch', 'unwatch' ) )
400401 ) {
401402 $nav[$section][$key]['key'] =
402 - $this->skin->tooltip( "ca-{$insert}{$key}" );
 403+ $this->skin->tooltip( $xmlID );
403404 } else {
404405 $nav[$section][$key]['key'] =
405 - $this->skin->tooltipAndAccesskey( "ca-{$insert}{$key}" );
 406+ $this->skin->tooltipAndAccesskey( $xmlID );
406407 }
407408 }
408409 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r52811Fixes what r52810 broke, making other tabs have the correct XML IDstparscal22:53, 6 July 2009

Status & tagging log