Fixes what r52810 broke, making other tabs have the correct XML IDs
authorTrevor Parscal <tparscal@users.mediawiki.org>
Mon, 6 Jul 2009 22:53:58 +0000 (22:53 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Mon, 6 Jul 2009 22:53:58 +0000 (22:53 +0000)
skins/Vector.php

index 1558fe4..c46393c 100644 (file)
@@ -374,14 +374,12 @@ class VectorTemplate extends QuickTemplate {
                foreach ( $nav as $section => $links ) {
                        foreach ( $links as $key => $link ) {
                                $xmlID = $key;
-                               if ( isset( $link['context'] ) ) {
-                                       if ( $link['context'] == 'subject' ) {
-                                               $xmlID = 'ca-nstab-' . $xmlID;
-                                       } else if ( $link['context'] == 'talk' ) {
-                                               $xmlID = 'ca-talk';
-                                       } else {
-                                               $xmlID = 'ca-' . $xmlID;
-                                       }
+                               if ( isset( $link['context'] ) && $link['context'] == 'subject' ) {
+                                       $xmlID = 'ca-nstab-' . $xmlID;
+                               } else if ( isset( $link['context'] ) && $link['context'] == 'talk' ) {
+                                       $xmlID = 'ca-talk';
+                               } else {
+                                       $xmlID = 'ca-' . $xmlID;
                                }
                                $nav[$section][$key]['attributes'] =
                                        ' id="' . Sanitizer::escapeId( $xmlID ) . '"';