From b9f76892a04e49e4407fa4330d9ce38a39e81ec0 Mon Sep 17 00:00:00 2001 From: zhuyifei1999 Date: Tue, 23 Jun 2015 02:27:58 +0000 Subject: [PATCH] Special:Interwiki: Remove "View log" link when $wgInterwikiViewOnly is not set to false Using same logic as in hooks. Bug: T103353 Change-Id: I337f136441be299d2c36dc19b7464998c915a87a --- Interwiki_body.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Interwiki_body.php b/Interwiki_body.php index bd1fe791..f3f60b59 100644 --- a/Interwiki_body.php +++ b/Interwiki_body.php @@ -333,11 +333,15 @@ class SpecialInterwiki extends SpecialPage { // Page intro content $this->getOutput()->addWikiMsg( 'interwiki_intro' ); - $logLink = Linker::link( - SpecialPage::getTitleFor( 'Log', 'interwiki' ), - $this->msg( 'interwiki-logtext' )->escaped() - ); - $this->getOutput()->addHTML( '

' . $logLink . '

' ); + + // Add 'view log' link when possible + if ( $wgInterwikiViewOnly === false ) { + $logLink = Linker::link( + SpecialPage::getTitleFor( 'Log', 'interwiki' ), + $this->msg( 'interwiki-logtext' )->escaped() + ); + $this->getOutput()->addHTML( '

' . $logLink . '

' ); + } // Add 'add' link if ( $canModify ) {