Fixed empty list of footer links when no footer messages are set.

This commit is contained in:
Trevor Parscal 2008-12-09 01:21:54 +00:00
parent 611b224f31
commit 6cd1e485ba

View file

@ -25,9 +25,9 @@ class SkinMonoBook extends SkinTemplate {
$this->skinname = 'monobook';
$this->stylename = 'monobook';
$this->template = 'MonoBookTemplate';
}
function setupSkinUserCss( OutputPage $out ) {
global $wgHandheldStyle;
@ -39,12 +39,12 @@ class SkinMonoBook extends SkinTemplate {
// Currently in testing... try 'chick/main.css'
$out->addStyle( $wgHandheldStyle, 'handheld' );
}
$out->addStyle( 'monobook/IE50Fixes.css', 'screen', 'lt IE 5.5000' );
$out->addStyle( 'monobook/IE55Fixes.css', 'screen', 'IE 5.5000' );
$out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' );
$out->addStyle( 'monobook/IE70Fixes.css', 'screen', 'IE 7' );
$out->addStyle( 'monobook/rtl.css', 'screen', '', 'rtl' );
}
}
@ -72,7 +72,7 @@ class MonoBookTemplate extends QuickTemplate {
wfSuppressWarnings();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php
<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php
foreach($this->data['xhtmlnamespaces'] as $tag => $ns) {
?>xmlns:<?php echo "{$tag}=\"{$ns}\" ";
} ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>">
@ -84,9 +84,9 @@ class MonoBookTemplate extends QuickTemplate {
<!--[if lt IE 7]><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js --></script>
<!-- Head Scripts -->
<?php $this->html('headscripts') ?>
@ -181,8 +181,8 @@ class MonoBookTemplate extends QuickTemplate {
echo $skin->tooltipAndAccesskey('n-mainpage') ?>></a>
</div>
<script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
<?php
$sidebar = $this->data['sidebar'];
<?php
$sidebar = $this->data['sidebar'];
if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
@ -210,20 +210,28 @@ class MonoBookTemplate extends QuickTemplate {
<?php }
// Generate additional footer links
?>
<ul id="f-list">
<?php
$footerlinks = array(
'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
'privacy', 'about', 'disclaimer', 'tagline',
);
$validFooterLinks = array();
foreach( $footerlinks as $aLink ) {
if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
<?php }
$validFooterLinks[] = $aLink;
}
}
if ( count( $validFooterLinks ) > 0 ) {
?> <ul id="f-list">
<?php
foreach( $validFooterLinks as $aLink ) {
if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
<?php }
}
?>
</ul>
<?php }
?>
</div>
</div>
<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
@ -319,7 +327,7 @@ class MonoBookTemplate extends QuickTemplate {
/*************************************************************************************************/
function languageBox() {
if( $this->data['language_urls'] ) {
if( $this->data['language_urls'] ) {
?>
<div id="p-lang" class="portlet">
<h5><?php $this->msg('otherlanguages') ?></h5>