Tobias Gritschacher has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/313402

Change subject: Avoid duplicate "printable version" link
......................................................................

Avoid duplicate "printable version" link

When the Collection extension is installed it is moving the
"printable version" link to its own section. We should not
create another link in that case.

Bug: T146894
Change-Id: If9cd3620a7da5e01064817da511209cb3cd67daa
---
M ElectronPdfService.hooks.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ElectronPdfService 
refs/changes/02/313402/1

diff --git a/ElectronPdfService.hooks.php b/ElectronPdfService.hooks.php
index e3507b1..295df1c 100644
--- a/ElectronPdfService.hooks.php
+++ b/ElectronPdfService.hooks.php
@@ -39,6 +39,10 @@
                $specialPageTitle = SpecialPage::getTitleFor( 'ElectronPdf' );
 
                if ( array_key_exists( 'print', $navUrls ) ) {
+                       if ( $navUrls['print'] === false ) {
+                               return true;
+                       }
+
                        $navUrls['print'] = [
                                'text' => $skin->msg( 'printableversion' 
)->text(),
                                'href' => $specialPageTitle->getLocalURL(

-- 
To view, visit https://gerrit.wikimedia.org/r/313402
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9cd3620a7da5e01064817da511209cb3cd67daa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ElectronPdfService
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher <tobias.gritschac...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to