From: Bartosz DziewoƄski Date: Fri, 18 Oct 2013 20:34:31 +0000 (+0200) Subject: BaseTemplate: Exclude two more attributes in makeLink() X-Git-Tag: 1.31.0-rc.0~18457 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=603180de45378780a9433f828d1f114ffc09d5dd;p=lhc%2Fweb%2Fwiklou.git BaseTemplate: Exclude two more attributes in makeLink() 'context' and 'primary' are used internally by some SkinTemplate functions and Vector. They should not be passed on to HTML. Bug: 55659 Bug: 55660 Change-Id: I1f7a656aacc93f9bf289c481f258824ae28ccf4e --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 44cafe9ebf..e5b8872c8a 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -1717,6 +1717,10 @@ abstract class BaseTemplate extends QuickTemplate { * on the link) is present it will be used to generate a tooltip and * accesskey for the link. * + * The keys "context" and "primary" are ignored; these keys are used + * internally by skins and are not supposed to be included in the HTML + * output. + * * If you don't want an accesskey, set $item['tooltiponly'] = true; * * @param array $options can be used to affect the output of a link. @@ -1757,7 +1761,7 @@ abstract class BaseTemplate extends QuickTemplate { if ( isset( $item['href'] ) || isset( $options['link-fallback'] ) ) { $attrs = $item; - foreach ( array( 'single-id', 'text', 'msg', 'tooltiponly' ) as $k ) { + foreach ( array( 'single-id', 'text', 'msg', 'tooltiponly', 'context', 'primary' ) as $k ) { unset( $attrs[$k] ); }