$tpl->set( 'lastmod', false );
$tpl->set( 'credits', false );
$tpl->set( 'numberofwatchingusers', false );
- if ( $out->isArticle() && $title->exists() ) {
- if ( $this->isRevisionCurrent() ) {
- if ( $wgMaxCredits != 0 ) {
- $tpl->set( 'credits', Action::factory( 'credits', $this->getWikiPage(),
- $this->getContext() )->getCredits( $wgMaxCredits, $wgShowCreditsIfMax ) );
- } else {
- $tpl->set( 'lastmod', $this->lastModified() );
+ if ( $title->exists() ) {
+ if ( $out->isArticle() ) {
+ if ( $this->isRevisionCurrent() ) {
+ if ( $wgMaxCredits != 0 ) {
+ $tpl->set( 'credits', Action::factory( 'credits', $this->getWikiPage(),
+ $this->getContext() )->getCredits( $wgMaxCredits, $wgShowCreditsIfMax ) );
+ } else {
+ $tpl->set( 'lastmod', $this->lastModified() );
+ }
}
}
- $tpl->set( 'copyright', $this->getCopyright() );
+ if ( $out->showsCopyright() ) {
+ $tpl->set( 'copyright', $this->getCopyright() );
+ }
}
$tpl->set( 'copyrightico', $this->getCopyrightIcon() );
}
} else {
// article doesn't exist or is deleted
- if ( $user->isAllowed( 'deletedhistory' ) ) {
+ if ( $title->quickUserCan( 'deletedhistory', $user ) ) {
$n = $title->isDeleted();
if ( $n ) {
$undelTitle = SpecialPage::getTitleFor( 'Undelete', $title->getPrefixedDBkey() );
// If the user can't undelete but can view deleted
// history show them a "View .. deleted" tab instead.
- $msgKey = $user->isAllowed( 'undelete' ) ? 'undelete' : 'viewdeleted';
+ $msgKey = $title->quickUserCan( 'undelete', $user ) ? 'undelete' : 'viewdeleted';
$content_navigation['actions']['undelete'] = [
'class' => $this->getTitle()->isSpecial( 'Undelete' ) ? 'selected' : false,
'text' => wfMessageFallback( "$skname-action-$msgKey", "{$msgKey}_short" )