From: Tim Starling Date: Sat, 19 Aug 2006 03:11:49 +0000 (+0000) Subject: Made monobook work when $wgArticle is null, this is currently the case on a read... X-Git-Tag: 1.31.0-rc.0~55950 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=7771508b5d7dd86aaa026e1d34f17f6a0764fe73;p=lhc%2Fweb%2Fwiklou.git Made monobook work when $wgArticle is null, this is currently the case on a read access denied error. --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 496219dbce..a3580d9146 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -320,7 +320,9 @@ class SkinTemplate extends Skin { $tpl->setRef( 'newtalk', $ntl ); $tpl->setRef( 'skin', $this); $tpl->set( 'logo', $this->logoText() ); - if ( $wgOut->isArticle() and (!isset( $oldid ) or isset( $diff )) and 0 != $wgArticle->getID() ) { + if ( $wgOut->isArticle() and (!isset( $oldid ) or isset( $diff )) and + $wgArticle and 0 != $wgArticle->getID() ) + { if ( !$wgDisableCounters ) { $viewcount = $wgLang->formatNum( $wgArticle->getCount() ); if ( $viewcount ) { @@ -814,7 +816,7 @@ class SkinTemplate extends Skin { // A print stylesheet is attached to all pages, but nobody ever // figures that out. :) Add a link... if( $this->iscontent && ($action == '' || $action == 'view' || $action == 'purge' ) ) { - $revid = $wgArticle->getLatest(); + $revid = $wgArticle ? $wgArticle->getLatest() : 0; if ( !( $revid == 0 ) ) $nav_urls['print'] = array( 'text' => wfMsg( 'printableversion' ),