r84215 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84214‎ | r84215 | r84216 >
Date:23:38, 17 March 2011
Author:purodha
Status:ok
Tags:
Comment:
Switch from wfMsg to wfMessage for outer box.
Modified paths:
  • /trunk/extensions/Babel/Babel.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Babel/Babel.class.php
@@ -53,28 +53,28 @@
5454 }
5555 }
5656
57 - $top = wfMsgExt( 'babel', array( 'parsemag', 'content' ), self::$title->getDBkey() );
58 - if ( strlen( $top ) == 0 ) {
 57+ $top = wfMessage( 'babel', self::$title->getDBkey() )->inContentLanguage(); // TODO: allow user language
 58+ if ( $top->isDisabled() ) {
5959 $top = '';
6060 } else {
61 - $url = wfMsgForContent( 'babel-url' );
62 - if ( ! strlen( $url ) == 0 ) {
63 - $top = '[['.$url.'|'.$top.']]';
 61+ $top = $top->text();
 62+ $url = wfMessage( 'babel-url' )->inContentLanguage();
 63+ if ( ! $url->isDisabled() ) {
 64+ $top = '[['.$url->text().'|'.$top.']]';
6465 }
6566 $top = '! class="mw-babel-header" | ' . $top;
6667 }
67 -
68 - $footer = wfMsgExt( 'babel-footer', array( 'parsemag' ), self::$title->getDBkey() );
69 - if ( strlen( $footer ) == 0 ) {
 68+ $footer = wfMessage( 'babel-footer', self::$title->getDBkey() )->inContentLanguage(); // TODO: allow user language
 69+ if ( $footer->isDisabled() ) {
7070 $footer = '';
7171 } else {
72 - $url = wfMsgForContent( 'babel-footer-url' );
73 - if ( ! strlen( $url ) == 0 ) {
74 - $footer = '[['.$url.'|'.$footer.']]';
 72+ $footer = $footer->text();
 73+ $url = wfMessage( 'babel-footer-url' )->inContentLanguage();
 74+ if ( ! $url->isDisabled() ) {
 75+ $footer = '[['.$url->text().'|'.$footer.']]';
7576 }
7677 $footer = '! class="mw-babel-footer" | ' . $footer;
7778 }
78 -
7979 $cellspacing = Babel::mHtmlAttrib( 'cellspacing', 'babel-box-cellspacing' );
8080 $cellpadding = Babel::mHtmlAttrib( 'cellpadding', 'babel-box-cellpadding' );
8181

Status & tagging log