Index: trunk/extensions/Babel/Babel.class.php |
— | — | @@ -53,20 +53,6 @@ |
54 | 54 | } |
55 | 55 | } |
56 | 56 | |
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 | | - |
71 | 57 | $top = wfMsgExt( 'babel', array( 'parsemag', 'content' ), self::$title->getDBkey() ); |
72 | 58 | if ( strlen( $top ) == 0 ) { |
73 | 59 | $top = ''; |
— | — | @@ -89,6 +75,9 @@ |
90 | 76 | $footer = '! class="mw-babel-footer" | ' . $footer; |
91 | 77 | } |
92 | 78 | |
| 79 | + $cellspacing = Babel::mHtmlAttrib( 'cellspacing', 'babel-box-cellspacing' ); |
| 80 | + $cellpadding = Babel::mHtmlAttrib( 'cellpadding', 'babel-box-cellpadding' ); |
| 81 | + |
93 | 82 | $tower = <<<EOT |
94 | 83 | {|$cellspacing$cellpadding class="mw-babel-wrapper" |
95 | 84 | $top |
— | — | @@ -199,11 +188,13 @@ |
200 | 189 | |
201 | 190 | $dir_content = wfMsgForContent( 'babel-directionality' ); |
202 | 191 | $dir_current = wfMsgExt( 'babel-directionality', array( 'language' => $code ) ); |
203 | | - $cellspacing = wfMsgForContent( 'babel-cellspacing' ); |
204 | 192 | |
| 193 | + $cellspacing = Babel::mHtmlAttrib( 'cellspacing', 'babel-cellspacing' ); |
| 194 | + $cellpadding = Babel::mHtmlAttrib( 'cellpadding', 'babel-cellpadding' ); |
| 195 | + |
205 | 196 | $box = <<<EOT |
206 | 197 | <div class="mw-babel-box mw-babel-box-$level" dir="$dir_content"> |
207 | | -{| cellspacing="$cellspacing" |
| 198 | +{|$cellspacing$cellpadding |
208 | 199 | ! dir="$dir_content" | $header |
209 | 200 | | dir="$dir_current" lang="$lang" xml:lang="$lang" | $text |
210 | 201 | |} |