r70979 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70978‎ | r70979 | r70980 >
Date:18:51, 12 August 2010
Author:kaldari
Status:ok
Tags:
Comment:
a couple more commaList() fixes, see r70905
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -1330,8 +1330,7 @@
13311331 * @return multiple select list
13321332 */
13331333 function languageMultiSelector( $selected = array(), $customisedOnly = true ) {
1334 - global $wgContLanguageCode;
1335 - global $wgScriptPath;
 1334+ global $wgContLanguageCode, $wgScriptPath, $wgLang;
13361335 $scriptPath = "$wgScriptPath/extensions/CentralNotice";
13371336 // Make sure the site language is in the list; a custom language code might not have a defined name...
13381337 $languages = Language::getLanguageNames( $customisedOnly );
@@ -1360,7 +1359,7 @@
13611360 $buttons[] = '<a href="#" onclick="top10Languages();return false;">' . wfMsg( 'centralnotice-top-ten-languages' ) . '</a>';
13621361 $htmlOut .= Xml::tags( 'div',
13631362 array( 'style' => 'margin-top: 0.2em;' ),
1364 - '<img src="'.$scriptPath.'/up-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-select', Language::commaList( $buttons ) )
 1363+ '<img src="'.$scriptPath.'/up-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-select', $wgLang->commaList( $buttons ) )
13651364 );
13661365 } else {
13671366 $htmlOut .= Xml::tags( 'select',
Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -182,7 +182,7 @@
183183 * Show "Add a banner" interface
184184 */
185185 function showAdd() {
186 - global $wgOut, $wgUser, $wgScriptPath;
 186+ global $wgOut, $wgUser, $wgScriptPath, $wgLang;
187187 $scriptPath = "$wgScriptPath/extensions/CentralNotice";
188188
189189 // Build HTML
@@ -201,7 +201,7 @@
202202 $buttons[] = '<a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>';
203203 $htmlOut .= Xml::tags( 'div',
204204 array( 'style' => 'margin-bottom: 0.2em;' ),
205 - '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert', Language::commaList( $buttons ) )
 205+ '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert', $wgLang->commaList( $buttons ) )
206206 );
207207 $htmlOut .= Xml::textarea( 'templateBody', '', 60, 20 );
208208 $htmlOut .= Xml::closeElement( 'fieldset' );
@@ -224,7 +224,7 @@
225225 * View or edit an individual banner
226226 */
227227 private function showView() {
228 - global $wgOut, $wgUser, $wgRequest, $wgContLanguageCode, $wgScriptPath;
 228+ global $wgOut, $wgUser, $wgRequest, $wgContLanguageCode, $wgScriptPath, $wgLang;
229229
230230 $scriptPath = "$wgScriptPath/extensions/CentralNotice";
231231 $sk = $wgUser->getSkin();
@@ -404,7 +404,7 @@
405405 $buttons[] = '<a href="#" onclick="insertButton(\'translate\');return false;">' . wfMsg( 'centralnotice-translate-button' ) . '</a>';
406406 $htmlOut .= Xml::tags( 'div',
407407 array( 'style' => 'margin-bottom: 0.2em;' ),
408 - '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert', Language::commaList( $buttons ) )
 408+ '<img src="'.$scriptPath.'/down-arrow.png" style="vertical-align:baseline;"/>' . wfMsg( 'centralnotice-insert', $wgLang->commaList( $buttons ) )
409409 );
410410 $htmlOut .= Xml::textarea( 'templateBody', $body, 60, 20, $readonly );
411411 $htmlOut .= Xml::closeElement( 'fieldset' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70905CentralNotice: fixes for r70904: Language::commaList() is not static, fixed g...maxsem18:45, 11 August 2010

Status & tagging log