From: Chad Horohoe Date: Wed, 26 Jan 2011 16:54:58 +0000 (+0000) Subject: First round of $wgArticle removals X-Git-Tag: 1.31.0-rc.0~32350 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=c1a29795b47ca26fa4b8d8aa7fe429feccb75e31;p=lhc%2Fweb%2Fwiklou.git First round of $wgArticle removals --- diff --git a/includes/Skin.php b/includes/Skin.php index 584253802f..3d6c0527bc 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1483,10 +1483,12 @@ class Skin extends Linker { return ''; } + $article = new Article( $this->mTitle, 0 ); + $s = ''; if ( !$wgDisableCounters ) { - $count = $wgLang->formatNum( $wgArticle->getCount() ); + $count = $wgLang->formatNum( $article->getCount() ); if ( $count ) { $s = wfMsgExt( 'viewcount', array( 'parseinline' ), $count ); @@ -1494,7 +1496,7 @@ class Skin extends Linker { } if ( $wgMaxCredits != 0 ) { - $s .= ' ' . Credits::getCredits( $wgArticle, $wgMaxCredits, $wgShowCreditsIfMax ); + $s .= ' ' . Credits::getCredits( $article, $wgMaxCredits, $wgShowCreditsIfMax ); } else { $s .= $this->lastModified(); } diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 5a973533fc..fc63dcebbb 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -345,9 +345,11 @@ class SkinTemplate extends Skin { $tpl->setRef( 'skin', $this ); $tpl->set( 'logo', $this->logoText() ); if ( $out->isArticle() && ( !isset( $oldid ) || isset( $diff ) ) && - $this->mTitle->exists() ){ + $this->mTitle->exists() ) + { + $article = new Article( $this->mTitle, 0 ); if ( !$wgDisableCounters ) { - $viewcount = $wgLang->formatNum( $wgArticle->getCount() ); + $viewcount = $wgLang->formatNum( $article->getCount() ); if ( $viewcount ) { $tpl->set( 'viewcount', wfMsgExt( 'viewcount', array( 'parseinline' ), $viewcount ) ); } else { @@ -383,7 +385,7 @@ class SkinTemplate extends Skin { $this->credits = false; if( $wgMaxCredits != 0 ){ - $this->credits = Credits::getCredits( $wgArticle, $wgMaxCredits, $wgShowCreditsIfMax ); + $this->credits = Credits::getCredits( $article, $wgMaxCredits, $wgShowCreditsIfMax ); } else { $tpl->set( 'lastmod', $this->lastModified() ); }