$action = $wgRequest->getText( 'action' );
$s = $this->printableLink();
- if ( wfMsgForContent ( 'disclaimers' ) != '-' )
- $s .= ' | ' . $this->makeKnownLink(
- wfMsgForContent( 'disclaimerpage' ),
- wfMsgForContent( 'disclaimers' ) ) ;
+ $s .= $this->disclaimerLink(); # may be empty
if ( $wgOut->isArticleRelated() ) {
if ( $wgTitle->getNamespace() == Namespace::getImage() ) {
function disclaimerLink() {
- $s = $this->makeKnownLink( wfMsgForContent( 'disclaimerpage' ),
- wfMsg( 'disclaimers' ) );
- return $s;
+ $disclaimers = wfMsg( 'disclaimers' );
+ if ($disclaimers == '-') {
+ return "";
+ } else {
+ return $this->makeKnownLink( wfMsgForContent( 'disclaimerpage' ),
+ $disclaimers );
+ }
}
function editThisPage() {
global $wgNavigationLinks;
$result = array();
foreach ( $wgNavigationLinks as $link ) {
- $result[] = array(
- 'text' => wfMsg( $link['text'] ),
- 'href' => $this->makeInternalOrExternalUrl( wfMsgForContent( $link['href'] ) ),
- 'id' => 'n-'.$link['text']
- );
+ if (wfMsg( $link['text'] ) != '-') {
+ $result[] = array(
+ 'text' => wfMsg( $link['text'] ),
+ 'href' => $this->makeInternalOrExternalUrl( wfMsgForContent( $link['href'] ) ),
+ 'id' => 'n-'.$link['text']
+ );
+ }
}
return $result;
}
$nav_urls['mainpage'] = array('href' => $this->makeI18nUrl('mainpage'));
$nav_urls['randompage'] = array('href' => $this->makeSpecialUrl('Randompage'));
$nav_urls['recentchanges'] = array('href' => $this->makeSpecialUrl('Recentchanges'));
- $nav_urls['currentevents'] = (wfMsg('currentevents') != '-') ? array('href' => $this->makeI18nUrl('currentevents')) : false;
- $nav_urls['portal'] = (wfMsg('portal') != '-') ? array('href' => $this->makeI18nUrl('portal-url')) : false;
+ $ce = wfMsg('currentevents');
+ wfDebug("Got to before here");
+ if (strcmp($ce, '-') != 0) {
+ wfDebug("GOT TO HERE");
+ $nav_urls['currentevents'] = array('href' => $this->makeI18nUrl('currentevents'));
+ }
+ $portal = wfMsg('portal');
+ if (strcmp($portal, '-') != 0) {
+ $nav_urls['portal'] = array('href' => $this->makeI18nUrl('portal-url'));
+ }
$nav_urls['bugreports'] = array('href' => $this->makeI18nUrl('bugreportspage'));
// $nav_urls['sitesupport'] = array('href' => $this->makeI18nUrl('sitesupportpage'));
$nav_urls['sitesupport'] = array('href' => $wgSiteSupportPage);
# hyphen (-). If you need more characters, you may be able to change
# the regex in MagicWord::initRegex
-# NOTE: To turn off "Current Events" in the sidebar,
-# set "currentevents" => ""
-
-# NOTE: To turn off "Disclaimers" in the title links,
-# set "disclaimers" => ""
-
-# NOTE: To turn off "Community portal" in the title links,
-# set "portal" => ""
-
-
# required for copyrightwarning
global $wgRightsText;
'mainpagetext' => 'Wiki software successfully installed.',
"mainpagedocfooter" => "Please see [http://meta.wikipedia.org/wiki/MediaWiki_i18n documentation on customizing the interface]
and the [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] for usage and configuration help.",
+
+# NOTE: To turn off "Community portal" in the title links,
+# set "portal" => "-"
+
'portal' => 'Community portal',
'portal-url' => '{{ns:4}}:Community Portal',
'about' => 'About',
'mytalk' => 'My talk',
'anontalk' => 'Talk for this IP',
'navigation' => 'Navigation',
+
+# NOTE: To turn off "Current Events" in the sidebar,
+# set "currentevents" => "-"
+
'currentevents' => 'Current events',
'currentevents-url' => 'Current events',
+
+# NOTE: To turn off "Disclaimers" in the title links,
+# set "disclaimers" => "-"
+
'disclaimers' => 'Disclaimers',
-"disclaimerpage" => "{{ns:4}}:General_disclaimer",
+"disclaimerpage" => "{{ns:4}}:General_disclaimer",
"errorpagetitle" => "Error",
"returnto" => "Return to $1.",
"tagline" => "From {{SITENAME}}",