From: Bartosz DziewoƄski Date: Mon, 9 Jun 2014 16:55:24 +0000 (+0200) Subject: Stop using a suboptimal structure for Vector's variants menu X-Git-Tag: 1.31.0-rc.0~14841^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=7354050532467102d011a6e022ff577814b124d5;p=lhc%2Fweb%2Fwiklou.git Stop using a suboptimal structure for Vector's variants menu One label is enough. We need to keep the styles and some inline hacks in the HTML for a while to keep current CSS compatible with old HTML, which is cached in WMF environment for up to 30 days. Follow-up to clean up the mess: I2817c6e9eb52ffc785a04bb9d23b0802a553fd45. Bug: 43406 Change-Id: Idf43d77dccff83ad81db776f3262e0ef12d25c92 --- diff --git a/skins/Vector/VectorTemplate.php b/skins/Vector/VectorTemplate.php index bffc65d86c..191635c2ec 100644 --- a/skins/Vector/VectorTemplate.php +++ b/skins/Vector/VectorTemplate.php @@ -411,25 +411,19 @@ class VectorTemplate extends BaseTemplate { echo ' emptyPortlet'; } ?>" aria-labelledby="p-variants-label"> -

- data['variant_urls'] as $link ) { - ?> - - - - getMsg( 'variants' )->text(); + foreach ( $this->data['variant_urls'] as $link ) { + if ( stripos( $link['attributes'], 'selected' ) !== false ) { + $variantLabel = $link['text']; + break; } - ?> -

- -

msg( 'variants' ) ?>

+ } + ?> +

+ >