r32843 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32842‎ | r32843 | r32844 >
Date:09:04, 6 April 2008
Author:ialex
Status:old
Tags:
Comment:
* Updated messages.inc per r32836
* Use $wgContLang and content messages to create the reason as it will be hardcoded in the database
Modified paths:
  • /trunk/phase3/includes/SpecialRevisiondelete.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -629,6 +629,14 @@
630630 'revdel-restore',
631631 'pagehist',
632632 'deletedhist',
 633+ 'revdelete-content',
 634+ 'revdelete-summary',
 635+ 'revdelete-uname',
 636+ 'revdelete-restricted',
 637+ 'revdelete-unrestricted',
 638+ 'revdelete-hid',
 639+ 'revdelete-unhid',
 640+ 'revdelete-log-message',
633641 ),
634642 'suppression' => array(
635643 'suppressionlog',
Index: trunk/phase3/includes/SpecialRevisiondelete.php
@@ -1366,16 +1366,16 @@
13671367 $diff = $n ^ $o;
13681368 $ret = array ( 0 => array(), 1 => array(), 2 => array() );
13691369
1370 - $this->checkItem ( wfMsg ( 'revdelete-content' ), 1, $diff, $n, &$ret );
1371 - $this->checkItem ( wfMsg ( 'revdelete-summary' ), 2, $diff, $n, &$ret );
1372 - $this->checkItem ( wfMsg ( 'revdelete-uname' ), 4, $diff, $n, &$ret );
 1370+ $this->checkItem ( wfMsgForContent ( 'revdelete-content' ), 1, $diff, $n, &$ret );
 1371+ $this->checkItem ( wfMsgForContent ( 'revdelete-summary' ), 2, $diff, $n, &$ret );
 1372+ $this->checkItem ( wfMsgForContent ( 'revdelete-uname' ), 4, $diff, $n, &$ret );
13731373
13741374 // Restriction application to sysops
13751375 if ( $diff & 8 ) {
13761376 if ( $n & 8 )
1377 - $ret[2][] = wfMsg ( 'revdelete-restricted' );
 1377+ $ret[2][] = wfMsgForContent ( 'revdelete-restricted' );
13781378 else
1379 - $ret[2][] = wfMsg ( 'revdelete-unrestricted' );
 1379+ $ret[2][] = wfMsgForContent ( 'revdelete-unrestricted' );
13801380 }
13811381
13821382 return $ret;
@@ -1392,19 +1392,19 @@
13931393 * @param String $comment The comment associated with the change.
13941394 */
13951395 function getLogMessage ( $count, $nbitfield, $obitfield, $comment ) {
1396 - global $wgLang;
 1396+ global $wgContLang;
13971397
13981398 $s = '';
13991399 $changes = $this->getChanges( $nbitfield, $obitfield );
14001400
14011401 if ( count ( $changes[0] ) ) {
1402 - $s .= wfMsg ( 'revdelete-hid', implode ( ', ', $changes[0] ) );
 1402+ $s .= wfMsgForContent ( 'revdelete-hid', implode ( ', ', $changes[0] ) );
14031403 }
14041404
14051405 if ( count ( $changes[1] ) ) {
14061406 if ($s) $s .= '; ';
14071407
1408 - $s .= wfMsg ( 'revdelete-unhid', implode ( ', ', $changes[1] ) );
 1408+ $s .= wfMsgForContent ( 'revdelete-unhid', implode ( ', ', $changes[1] ) );
14091409 }
14101410
14111411 if ( count ( $changes[2] )) {
@@ -1414,8 +1414,8 @@
14151415 $s = $changes[2][0];
14161416 }
14171417
1418 - $ret = wfMsgExt ( 'revdelete-log-message', array( 'parsemag' ),
1419 - $s, $wgLang->formatNum($count) );
 1418+ $ret = wfMsgExt ( 'revdelete-log-message', array( 'parsemag', 'content' ),
 1419+ $s, $wgContLang->formatNum( $count ) );
14201420
14211421 if ( $comment )
14221422 $ret .= ": $comment";

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r32836Make rev_deleted log entries more intelligible for those of us who "don't spe...amidaniel06:30, 6 April 2008

Status & tagging log