r84030 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84029‎ | r84030 | r84031 >
Date:16:20, 15 March 2011
Author:raymond
Status:ok
Tags:
Comment:
Revert r84027 for now: PHP Fatal error: Call to undefined method Babel::mHtmlAttrib() in /www/w/extensions/Babel/Babel.class.php on line 192
Modified paths:
  • /trunk/extensions/Babel/Babel.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Babel/Babel.class.php
@@ -53,6 +53,20 @@
5454 }
5555 }
5656
 57+ $cellspacing = wfMsgForContent( 'babel-box-cellspacing' );
 58+ if ( strlen( $cellspacing ) == 0 ) {
 59+ $cellspacing = '';
 60+ } else {
 61+ $cellspacing = ' cellspacing="'.$cellspacing.'"';
 62+ }
 63+
 64+ $cellpadding = wfMsgForContent( 'babel-box-cellpadding' );
 65+ if ( strlen( $cellpadding ) == 0 ) {
 66+ $cellpadding = '';
 67+ } else {
 68+ $cellpadding = ' cellpadding="'.$cellpadding.'"';
 69+ }
 70+
5771 $top = wfMsgExt( 'babel', array( 'parsemag', 'content' ), self::$title->getDBkey() );
5872 if ( strlen( $top ) == 0 ) {
5973 $top = '';
@@ -75,9 +89,6 @@
7690 $footer = '! class="mw-babel-footer" | ' . $footer;
7791 }
7892
79 - $cellspacing = Babel::mHtmlAttrib( 'cellspacing', 'babel-box-cellspacing' );
80 - $cellpadding = Babel::mHtmlAttrib( 'cellpadding', 'babel-box-cellpadding' );
81 -
8293 $tower = <<<EOT
8394 {|$cellspacing$cellpadding class="mw-babel-wrapper"
8495 $top
@@ -188,13 +199,11 @@
189200
190201 $dir_content = wfMsgForContent( 'babel-directionality' );
191202 $dir_current = wfMsgExt( 'babel-directionality', array( 'language' => $code ) );
 203+ $cellspacing = wfMsgForContent( 'babel-cellspacing' );
192204
193 - $cellspacing = Babel::mHtmlAttrib( 'cellspacing', 'babel-cellspacing' );
194 - $cellpadding = Babel::mHtmlAttrib( 'cellpadding', 'babel-cellpadding' );
195 -
196205 $box = <<<EOT
197206 <div class="mw-babel-box mw-babel-box-$level" dir="$dir_content">
198 -{|$cellspacing$cellpadding
 207+{| cellspacing="$cellspacing"
199208 ! dir="$dir_content" | $header
200209 | dir="$dir_current" lang="$lang" xml:lang="$lang" | $text
201210 |}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84027More systematic handling of cellspacing and cellpadding attributes.purodha15:56, 15 March 2011

Status & tagging log