Remove 'redundant' attribute from BaseTemplate::makeListItem() links
authorIsarra <zhorishna@gmail.com>
Fri, 16 Aug 2019 16:46:32 +0000 (16:46 +0000)
committerIsarra <zhorishna@gmail.com>
Fri, 16 Aug 2019 16:46:32 +0000 (16:46 +0000)
in case this is not done in SkinTemplate::buildContentActionUrls()

Not all skins are going to use buildContentActionUrls() in the first
place, as they may not be laying out the usual action tabs as, well,
the usual action tabs. Given that this is being added in core, it
should likewise be cleaned up in core.

Bug: T214202
Change-Id: I630410aea2852f7a72fea67bbf256b3561ea0f3f

includes/skins/BaseTemplate.php

index cd79259..cad69a5 100644 (file)
@@ -466,6 +466,10 @@ abstract class BaseTemplate extends QuickTemplate {
         * @return string
         */
        function makeListItem( $key, $item, $options = [] ) {
+               // In case this is still set from SkinTemplate, we don't want it to appear in
+               // the HTML output (normally removed in SkinTemplate::buildContentActionUrls())
+               unset( $item['redundant'] );
+
                if ( isset( $item['links'] ) ) {
                        $links = [];
                        foreach ( $item['links'] as $linkKey => $link ) {