r65194 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65193‎ | r65194 | r65195 >
Date:21:57, 17 April 2010
Author:platonides
Status:ok
Tags:
Comment:
Follow up r65190 with more wfMsg changes.
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -186,7 +186,7 @@
187187 $project_name = $wgRequest->getVal( 'project_name' );
188188 $project_language = $wgRequest->getVal( 'wpUserLanguage' );
189189 if ( $noticeName == '' ) {
190 - $wgOut->addHTML( wfMsg ( 'centralnotice-null-string' ) );
 190+ $wgOut->addWikiwfMsg ( 'centralnotice-null-string' );
191191 }
192192 else {
193193 $this->addNotice( $noticeName, '0', $start, $project_name, $project_language );
@@ -414,7 +414,7 @@
415415 )
416416 );
417417 }
418 - $htmlOut .= Xml::fieldset( wfMsgHtml( "centralnotice-manage" ) );
 418+ $htmlOut .= Xml::fieldset( wfMsg( "centralnotice-manage" ) );
419419 $htmlOut .= Xml::openElement( 'table',
420420 array(
421421 'cellpadding' => 9,
@@ -503,7 +503,7 @@
504504 if ( $this->editable ) {
505505 $htmlOut .= $this->tableRow(
506506 array(
507 - Xml::submitButton( wfMsgHtml( 'centralnotice-modify' ),
 507+ Xml::submitButton( wfMsg( 'centralnotice-modify' ),
508508 array(
509509 'id' => 'centralnoticesubmit',
510510 'name' => 'centralnoticesubmit'
@@ -1034,7 +1034,7 @@
10351035 $dbr = wfGetDB( DB_SLAVE );
10361036 $res = $dbr->select( 'cn_notices', 'not_name', array( 'not_name' => $noticeName ) );
10371037 if ( $dbr->numRows( $res ) > 0 ) {
1038 - $wgOut->addHTML( wfMsg( 'centralnotice-notice-exists' ) );
 1038+ $wgOut->addWikiMsg( 'centralnotice-notice-exists' );
10391039 return;
10401040 } else {
10411041 $dbw = wfGetDB( DB_MASTER );
@@ -1076,12 +1076,12 @@
10771077 array( 'not_name' => $noticeName )
10781078 );
10791079 if ( $dbr->numRows( $res ) < 1 ) {
1080 - $wgOut->addHTML( wfMsg( 'centralnotice-notice-doesnt-exist' ) );
 1080+ $wgOut->addWikiMsg( 'centralnotice-notice-doesnt-exist' );
10811081 return;
10821082 }
10831083 $row = $dbr->fetchObject( $res );
10841084 if ( $row->not_locked == '1' ) {
1085 - $wgOut->addHTML( wfMsg( 'centralnotice-notice-is-locked' ) );
 1085+ $wgOut->addWikiMsg( 'centralnotice-notice-is-locked' );
10861086 return;
10871087 } else {
10881088 $dbw = wfGetDB( DB_MASTER );
@@ -1109,7 +1109,7 @@
11101110 )
11111111 );
11121112 if ( $dbr->numRows( $res ) > 0 ) {
1113 - $wgOut->addHTML( wfMsg( 'centralnotice-template-already-exists' ) );
 1113+ $wgOut->addWikiMsg( 'centralnotice-template-already-exists' );
11141114 } else {
11151115 $dbw = wfGetDB( DB_MASTER );
11161116 $dbw->begin();
@@ -1177,14 +1177,14 @@
11781178
11791179 // Start / end dont line up
11801180 if ( $start > $end || $end < $start ) {
1181 - $wgOut->addHTML( wfMsg( 'centralnotice-invalid-date-range3' ) );
 1181+ $wgOut->addWikiMsg( 'centralnotice-invalid-date-range3' );
11821182 return;
11831183 }
11841184
11851185 // Invalid notice name
11861186 $res = $dbr->select( 'cn_notices', 'not_name', array( 'not_name' => $noticeName ) );
11871187 if ( $dbr->numRows( $res ) < 1 ) {
1188 - $wgOut->addHTML( wfMsg( 'centralnotice-doesnt-exist' ) );
 1188+ $wgOut->addWikiMsg( 'centralnotice-doesnt-exist' );
11891189 }
11901190
11911191 // Overlap over a date within the same project and language
@@ -1211,7 +1211,7 @@
12121212 array( 'not_name' => $noticeName )
12131213 );
12141214 if ( $dbr->numRows( $res ) < 1 ) {
1215 - $wgOut->addHTML( wfMsg( 'centralnotice-doesnt-exist' ) );
 1215+ $wgOut->addWikiMsg( 'centralnotice-doesnt-exist' );
12161216 } else {
12171217 $dbw = wfGetDB( DB_MASTER );
12181218 $dbw->begin();
Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -373,7 +373,7 @@
374374 Xml::tags( 'td', null, $lsLabel ) .
375375 Xml::tags( 'td', null, $lsSelect ) .
376376 Xml::tags( 'td', array( 'colspan' => 2 ),
377 - Xml::submitButton( wfMsgHtml( 'centralnotice-modify' ) )
 377+ Xml::submitButton( wfMsg( 'centralnotice-modify' ) )
378378 )
379379 );
380380 $htmlOut .= Xml::tags( 'tr', null,
@@ -521,7 +521,7 @@
522522 // FIXME: weak comparison
523523 if ( $name == '' ) {
524524 // FIXME: message not defined?
525 - $wgOut->addHTML( wfMsg( 'centralnotice-template-doesnt-exist' ) );
 525+ $wgOut->addWikiMsg( 'centralnotice-template-doesnt-exist' );
526526 return;
527527 }
528528

Follow-up revisions

RevisionCommit summaryAuthorDate
r65195Follow up r65194. Typo.platonides22:23, 17 April 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65190Escaping fixes, added some FIXMEsnikerabbit21:34, 17 April 2010

Status & tagging log