Revert r106094 (broken unnecessary cleanup), r106454 (ugly unneceessary cleanup)
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 20 Dec 2011 21:57:17 +0000 (21:57 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 20 Dec 2011 21:57:17 +0000 (21:57 +0000)
The ugliness of this sort of code is probably part of why there's still a Linker::tooltip() function.
Please don't just replace it with worse code; if truly cleaning it up this should be done by giving a saner interface to the nav generation code

skins/Vector.php

index 3d69424..1779566 100644 (file)
@@ -97,10 +97,8 @@ class VectorTemplate extends BaseTemplate {
                                        unset( $nav[$section][$key]['class'] );
                                }
                                if ( isset( $link['tooltiponly'] ) && $link['tooltiponly'] ) {
-                                       $tooltip = Linker::titleAttrib( $xmlID );
-                                       $tooltip = $tooltip === false ? '' : Xml::expandAttributes( array( 'title' => $tooltip ) );
-                                       $nav[$section][$key]['key'] = $tooltip;
-                                               
+                                       $nav[$section][$key]['key'] =
+                                               Linker::tooltip( $xmlID );
                                } else {
                                        $nav[$section][$key]['key'] =
                                                Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( $xmlID ) );