Sumit has uploaded a new change for review. https://gerrit.wikimedia.org/r/248277
Change subject: WikidataPageBanner add a separate flag for toc ...................................................................... WikidataPageBanner add a separate flag for toc This will prevent setting the actual toc with true, which results in rendering of 1 in place of actual toc. Bug: T115719 Change-Id: Iac3f17a0223e3a9d06d5a026ffc20d02eddfef3e --- M includes/WikidataPageBanner.functions.php M includes/WikidataPageBanner.hooks.php 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner refs/changes/77/248277/1 diff --git a/includes/WikidataPageBanner.functions.php b/includes/WikidataPageBanner.functions.php index b6cb2f4..8865e59 100644 --- a/includes/WikidataPageBanner.functions.php +++ b/includes/WikidataPageBanner.functions.php @@ -22,7 +22,7 @@ */ public static function addToc( &$paramsForBannerTemplate, $options ) { if ( isset( $options['toc'] ) && $options['toc'] === 'yes' ) { - $paramsForBannerTemplate['toc'] = true; + $paramsForBannerTemplate['enable-toc'] = true; } } diff --git a/includes/WikidataPageBanner.hooks.php b/includes/WikidataPageBanner.hooks.php index bed606a..f8cbb25 100644 --- a/includes/WikidataPageBanner.hooks.php +++ b/includes/WikidataPageBanner.hooks.php @@ -150,7 +150,7 @@ $options = $pOut->getProperty( 'wpb-banner-options' ); // if toc parameter set and toc enabled, remove original classes and add banner class - if ( isset( $options['toc'] ) && $pOut->getTOCEnabled() ) { + if ( isset( $options['enable-toc'] ) && $pOut->getTOCEnabled() ) { $options['toc'] = $pOut->getTOCHTML(); // replace id and class of toc with blank // FIXME! This code is hacky, until core has better handling of toc contents -- To view, visit https://gerrit.wikimedia.org/r/248277 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac3f17a0223e3a9d06d5a026ffc20d02eddfef3e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Sumit <asthana.sumi...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits