global $wgArticle, $wgUser, $wgLang, $wgContLang;
global $wgScript, $wgStylePath, $wgContLanguageCode;
global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgRequest;
- global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces;
+ global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces, $wgHtml5Version;
global $wgDisableCounters, $wgLogo, $wgHideInterlanguageLinks;
global $wgMaxCredits, $wgShowCreditsIfMax;
global $wgPageShowWatchingUsers;
$tpl->setRef( 'xhtmldefaultnamespace', $wgXhtmlDefaultNamespace );
$tpl->set( 'xhtmlnamespaces', $wgXhtmlNamespaces );
+ $tpl->set( 'html5version', $wgHtml5Version );
$tpl->set( 'headlinks', $out->getHeadLinks() );
$tpl->set( 'csslinks', $out->buildCssLinks() );
$tpl->set( 'capitalizeallnouns', $wgLang->capitalizeAllNouns() ? ' capitalize-all-nouns' : '' );
$tpl->set( 'langname', $wgContLang->getLanguageName( $wgContLanguageCode ) );
$tpl->set( 'showjumplinks', $wgUser->getOption( 'showjumplinks' ) );
- $tpl->set( 'username', $wgUser->isAnon() ? NULL : $this->username );
+ $tpl->set( 'username', $wgUser->isAnon() ? null : $this->username );
$tpl->setRef( 'userpage', $this->userpage );
$tpl->setRef( 'userpageurl', $this->userpageUrlDetails['href'] );
$tpl->set( 'userlang', $wgLang->getCode() );
// adds new section link if page is a current revision of a talk page or
if ( ( $wgArticle && $wgArticle->isCurrent() && $istalk ) || $wgOut->showNewSectionLink() ) {
if ( !$wgOut->forceHideNewSectionLink() ) {
+ $urlArgs = 'action=edit§ion=new';
+ $preloadMsg = wfMsg( 'talk-addsection-preload' );
+ $editintroMsg = wfMsg( 'talk-addsection-editintro' );
+ if( '' != $preloadMsg ) {
+ $urlArgs .= '&preload=' . urlencode( $preloadMsg );
+ }
+ if( '' != $editintroMsg ) {
+ $urlArgs .= '&editintro=' . urlencode( $editintroMsg );
+ }
$content_actions['addsection'] = array(
'class' => $section == 'new' ? 'selected' : false,
'text' => wfMsg( 'addsection' ),
- 'href' => $this->mTitle->getLocalUrl( 'action=edit§ion=new' )
+ 'href' => $this->mTitle->getLocalUrl( $urlArgs )
);
}
}
}
- wfRunHooks( 'SkinTemplateTabs', array( &$this, &$content_actions ) );
+ wfRunHooks( 'SkinTemplateTabs', array( $this, &$content_actions ) );
} else {
/* show special page tab */