Fixes for r56068 and r55984:
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 11 Sep 2009 10:59:15 +0000 (10:59 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 11 Sep 2009 10:59:15 +0000 (10:59 +0000)
* missing "!" for the check $wgEnableTooltipsAndAccesskeys
* Linker::tooltip() return a string, no an array
* spacing fixes

includes/Linker.php

index 60407e8..4b37f29 100644 (file)
@@ -1942,7 +1942,7 @@ class Linker {
         */
        public function tooltipAndAccesskey( $name ) {
                global $wgEnableTooltipsAndAccesskeys;
-               if (!$wgEnableTooltipsAndAccesskeys)
+               if ( !$wgEnableTooltipsAndAccesskeys )
                        return array();
                # FIXME: If Sanitizer::expandAttributes() treated "false" as "output
                # no attribute" instead of "output '' as value for attribute", this
@@ -1963,8 +1963,8 @@ class Linker {
        /** @deprecated Returns raw bits of HTML, use titleAttrib() */
        public function tooltip( $name, $options = null ) {
                global $wgEnableTooltipsAndAccesskeys;
-               if ($wgEnableTooltipsAndAccesskeys)
-                       return array();
+               if ( !$wgEnableTooltipsAndAccesskeys )
+                       return '';
                # FIXME: If Sanitizer::expandAttributes() treated "false" as "output
                # no attribute" instead of "output '' as value for attribute", this
                # would be two lines.