Special:Interwiki: Remove "View log" link when $wgInterwikiViewOnly is not set to false

Using same logic as in hooks.

Bug: T103353
Change-Id: I337f136441be299d2c36dc19b7464998c915a87a
This commit is contained in:
zhuyifei1999 2015-06-23 02:27:58 +00:00 committed by Reedy
parent abae0ad1bd
commit b9f76892a0

View file

@ -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( '<p class="mw-interwiki-log">' . $logLink . '</p>' );
// Add 'view log' link when possible
if ( $wgInterwikiViewOnly === false ) {
$logLink = Linker::link(
SpecialPage::getTitleFor( 'Log', 'interwiki' ),
$this->msg( 'interwiki-logtext' )->escaped()
);
$this->getOutput()->addHTML( '<p class="mw-interwiki-log">' . $logLink . '</p>' );
}
// Add 'add' link
if ( $canModify ) {