From: Domas Mituzas Date: Mon, 7 Sep 2009 18:38:40 +0000 (+0000) Subject: features time - a feature that allows to disable a feature! X-Git-Tag: 1.31.0-rc.0~39875 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=2196f0031331bfbc894e6a409175c1cb9335acdf;p=lhc%2Fweb%2Fwiklou.git features time - a feature that allows to disable a feature! (rationale: allows turning off relatively expensive code that generates invisible stuff :) --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index d0b806f63d..698ec27d94 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3466,6 +3466,11 @@ $wgDisabledActions = array(); */ $wgDisableHardRedirects = false; +/** + * Disable tooltips and access keys + */ +$wgDisableTooltipsAndAccesskeys = false; + /** * Use http.dnsbl.sorbs.net to check for open proxies */ diff --git a/includes/Linker.php b/includes/Linker.php index 821611d054..a25013b06a 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1941,6 +1941,9 @@ class Linker { * @deprecated Returns raw bits of HTML, use titleAttrib() and accesskey() */ public function tooltipAndAccesskey( $name ) { + global $wgDisableTooltipsAndAccesskeys; + if ($wgDisableTooltipsAndAccesskeys) + return array(); # FIXME: If Sanitizer::expandAttributes() treated "false" as "output # no attribute" instead of "output '' as value for attribute", this # would be three lines. @@ -1959,6 +1962,9 @@ class Linker { /** @deprecated Returns raw bits of HTML, use titleAttrib() */ public function tooltip( $name, $options = null ) { + global $wgDisableTooltipsAndAccesskeys; + if ($wgDisableTooltipsAndAccesskeys) + return array(); # FIXME: If Sanitizer::expandAttributes() treated "false" as "output # no attribute" instead of "output '' as value for attribute", this # would be two lines.