* @private
*/
function buildContentActionUrls() {
- global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest;
+ global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle;
wfProfileIn( __METHOD__ );
'href' => $this->mTitle->getLocalUrl( $this->editUrlOptions() )
);
- if ( $istalk || $wgOut->showNewSectionLink() ) {
+ // adds new section link if page is a current revision of a talk page or
+ if ( ( $wgArticle->isCurrent() && $istalk ) || $wgOut->showNewSectionLink() ) {
if ( !$wgOut->forceHideNewSectionLink() ) {
$content_actions['addsection'] = array(
'class' => $section == 'new' ? 'selected' : false,
'text' => wfMsg( 'addsection' ),
'href' => $this->mTitle->getLocalUrl( 'action=edit§ion=new' )
- );
+ );
}
- }
+ }
} elseif ( $this->mTitle->isKnown() ) {
$content_actions['viewsource'] = array(
'class' => ($action == 'edit') ? 'selected' : false,
$msg = $this->translator->translate( $str );
return ( $msg != '-' ) && ( $msg != '' ); # ????
}
-}
\ No newline at end of file
+}
* @private
*/
function buildNavigationUrls() {
- global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest;
+ global $wgContLang, $wgLang, $wgOut, $wgUser, $wgRequest, $wgArticle;
global $wgDisableLangConversion;
wfProfileIn( __METHOD__ );
'href' =>
$this->mTitle->getLocalUrl( $this->editUrlOptions() )
);
- // Checks if this is a talk page and we should show a new
+ // Checks if this is a current rev of talk page and we should show a new
// section link
- if ( $isTalk || $wgOut->showNewSectionLink() ) {
+ if ( ( $isTalk && $wgArticle->isCurrent() ) || ( $wgOut->showNewSectionLink() ) ) {
// Checks if we should ever show a new section link
if ( !$wgOut->forceHideNewSectionLink() ) {
// Adds new section link