$tpl->setRef( 'stylename', $this->stylename );
$tpl->setRef( 'loggedin', $this->loggedin );
$tpl->set('nsclass', 'ns-'.$wgTitle->getNamespace());
+ $tpl->set('notspecialpage', $wgTitle->getNamespace() != NS_SPECIAL);
/* XXX currently unused, might get useful later
$tpl->set( "editable", ($wgTitle->getNamespace() != NS_SPECIAL ) );
$tpl->set( "exists", $wgTitle->getArticleID() != 0 );
$nav_urls['mainpage'] = array('href' => htmlspecialchars( $this->makeI18nUrl('mainpage')));
$nav_urls['randompage'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Randompage')));
$nav_urls['recentchanges'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchanges')));
- $nav_urls['whatlinkshere'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Whatlinkshere', 'target='.urlencode( $this->thispage ))));
$nav_urls['currentevents'] = (wfMsg('currentevents') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('currentevents'))) : false;
$nav_urls['portal'] = (wfMsg('portal') != '-') ? array('href' => htmlspecialchars( $this->makeI18nUrl('portal-url'))) : false;
- $nav_urls['recentchangeslinked'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchangeslinked', 'target='.urlencode( $this->thispage ))));
$nav_urls['bugreports'] = array('href' => htmlspecialchars( $this->makeI18nUrl('bugreportspage')));
// $nav_urls['sitesupport'] = array('href' => htmlspecialchars( $this->makeI18nUrl('sitesupportpage')));
$nav_urls['sitesupport'] = array('href' => htmlspecialchars( $wgSiteSupportPage));
}
$nav_urls['specialpages'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Specialpages')));
+ if( $wgTitle->getNamespace() != NS_SPECIAL) {
+ $nav_urls['whatlinkshere'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Whatlinkshere', 'target='.urlencode( $this->thispage ))));
+ $nav_urls['recentchangeslinked'] = array('href' => htmlspecialchars( $this->makeSpecialUrl('Recentchangeslinked', 'target='.urlencode( $this->thispage ))));
+ }
+
if( $wgTitle->getNamespace() == NS_USER || $wgTitle->getNamespace() == NS_USER_TALK ) {
$id = User::idFromName($wgTitle->getText());
$ip = User::isIP($wgTitle->getText());
}
}
-
return $nav_urls;
}
<h5 i18n:translate="string:toolbox">Toolbox</h5>
<div class="pBody">
<ul>
- <li id="t-whatlinkshere"><a href="${nav_urls/whatlinkshere/href}"
+ <li id="t-whatlinkshere" tal:condition="notspecialpage"><a href="${nav_urls/whatlinkshere/href}"
i18n:translate="string:whatlinkshere">What links here</a></li>
- <li id="t-recentchangeslinked"><a href="${nav_urls/recentchangeslinked/href}"
+ <li id="t-recentchangeslinked" tal:condition="notspecialpage"><a href="${nav_urls/recentchangeslinked/href}"
i18n:translate="string:recentchangeslinked">Related Changes</a></li>
<li tal:condition="feeds" id="feedlinks">
<span i18n:translate="string:feedlinks">Feeds:</span>
<h5 i18n:translate="string:toolbox">Toolbox</h5>
<div class="pBody">
<ul>
- <li id="t-whatlinkshere"><a href="${nav_urls/whatlinkshere/href}"
+ <li id="t-whatlinkshere" tal:condition="notspecialpage"><a href="${nav_urls/whatlinkshere/href}"
i18n:translate="string:whatlinkshere">What links here</a></li>
- <li id="t-recentchangeslinked"><a href="${nav_urls/recentchangeslinked/href}"
+ <li id="t-recentchangeslinked" tal:condition="notspecialpage"><a href="${nav_urls/recentchangeslinked/href}"
i18n:translate="string:recentchangeslinked">Related Changes</a></li>
<li tal:condition="feeds" id="feedlinks">
<span i18n:translate="string:feedlinks">Feeds:</span>