$this->credits = false;
- if (isset($wgMaxCredits) && $wgMaxCredits != 0) {
- require_once("Credits.php");
- $this->credits = getCredits($wgArticle, $wgMaxCredits, $wgShowCreditsIfMax);
+ if( $wgMaxCredits != 0 ){
+ $this->credits = Credits::getCredits( $wgArticle, $wgMaxCredits, $wgShowCreditsIfMax );
} else {
- $tpl->set('lastmod', $this->lastModified());
+ $tpl->set( 'lastmod', $this->lastModified() );
}
$tpl->setRef( 'credits', $this->credits );
if ( $istalk || $wgOut->showNewSectionLink() ) {
$content_actions['addsection'] = array(
'class' => $section == 'new'?'selected':false,
- 'text' => $istalk ? wfMsg( 'postcomment' ) : wfMsg('addsection'),
+ 'text' => wfMsg('addsection'),
'href' => $this->mTitle->getLocalUrl( 'action=edit§ion=new' )
);
}
wfProfileOut( __METHOD__."-edit" );
wfProfileIn( __METHOD__."-live" );
- if ( $this->mTitle->getArticleId() ) {
+ if ( $this->mTitle->exists() ) {
$content_actions['history'] = array(
'class' => ($action == 'history') ? 'selected' : false,
}
if ( $this->mTitle->getNamespace() !== NS_MEDIAWIKI && $wgUser->isAllowed( 'protect' ) ) {
- if(!$this->mTitle->isProtected()){
+ if( !$this->mTitle->isProtected() ){
$content_actions['protect'] = array(
'class' => ($action == 'protect') ? 'selected' : false,
'text' => wfMsg('protect'),