r102912 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102911‎ | r102912 | r102913 >
Date:21:47, 13 November 2011
Author:robin
Status:ok
Tags:
Comment:
Don't show the "Users by language" footer if it doesn't link to a page. (The "Babel user information" top still makes sense without link). See also bug 31115.
Modified paths:
  • /trunk/extensions/Babel/Babel.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Babel/Babel.class.php
@@ -68,15 +68,10 @@
6969 $top = '! class="mw-babel-header" | ' . $top;
7070 }
7171 $footer = wfMessage( 'babel-footer', self::$title->getDBkey() )->inContentLanguage(); // TODO: allow user language
72 - if ( $footer->isDisabled() ) {
73 - $footer = '';
74 - } else {
75 - $footer = $footer->text();
76 - $url = wfMessage( 'babel-footer-url' )->inContentLanguage();
77 - if ( ! $url->isDisabled() ) {
78 - $footer = '[['.$url->text().'|'.$footer.']]';
79 - }
80 - $footer = '! class="mw-babel-footer" | ' . $footer;
 72+ $url = wfMessage( 'babel-footer-url' )->inContentLanguage();
 73+ $showfooter = '';
 74+ if ( !$footer->isDisabled() && !$url->isDisabled() ) {
 75+ $showfooter = '! class="mw-babel-footer" | [['.$url->text().'|'.$footer->text().']]';
8176 }
8277 $cellspacing = Babel::mHtmlAttrib( 'cellspacing', 'babel-box-cellspacing' );
8378 $cellpadding = Babel::mHtmlAttrib( 'cellpadding', 'babel-box-cellpadding' );
@@ -87,7 +82,7 @@
8883 |-
8984 | $content
9085 |-
91 -$footer
 86+$showfooter
9287 |}
9388 EOT;
9489 return $tower;

Follow-up revisions

RevisionCommit summaryAuthorDate
r105909Babel: MFT r102899 r102900 r102912 r105540nikerabbit17:38, 12 December 2011

Status & tagging log