r32857 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32856‎ | r32857 | r32858 >
Date:16:38, 6 April 2008
Author:aaron
Status:old
Tags:
Comment:
Use different message for log items
Modified paths:
  • /trunk/phase3/includes/SpecialRevisiondelete.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialRevisiondelete.php
@@ -1389,9 +1389,10 @@
13901390 * @param int $count The number of effected revisions.
13911391 * @param int $nbitfield The new bitfield for the revision.
13921392 * @param int $obitfield The old bitfield for the revision.
1393 - * @param String $comment The comment associated with the change.
 1393+ * @param string $comment The comment associated with the change.
 1394+ * @param bool $isForLog
13941395 */
1395 - function getLogMessage ( $count, $nbitfield, $obitfield, $comment ) {
 1396+ function getLogMessage ( $count, $nbitfield, $obitfield, $comment, $isForLog = false ) {
13961397 global $wgContLang;
13971398
13981399 $s = '';
@@ -1414,7 +1415,8 @@
14151416 $s = $changes[2][0];
14161417 }
14171418
1418 - $ret = wfMsgExt ( 'revdelete-log-message', array( 'parsemag', 'content' ),
 1419+ $msg = $isForLog ? 'logdelete-log-message' : 'revdelete-log-message';
 1420+ $ret = wfMsgExt ( $msg, array( 'parsemag', 'content' ),
14191421 $s, $wgContLang->formatNum( $count ) );
14201422
14211423 if ( $comment )
@@ -1440,9 +1442,9 @@
14411443 $logtype = ( ($nbitfield | $obitfield) & Revision::DELETED_RESTRICTED ) ? 'suppress' : 'delete';
14421444 $log = new LogPage( $logtype );
14431445
1444 - $reason = $this->getLogMessage ( $count, $nbitfield, $obitfield, $comment );
 1446+ $reason = $this->getLogMessage ( $count, $nbitfield, $obitfield, $comment, $param == 'logid' );
14451447
1446 - if( $param=='logid' ) {
 1448+ if( $param == 'logid' ) {
14471449 $params = array( implode( ',', $items) );
14481450 $log->addEntry( 'event', $title, $reason, $params );
14491451 } else {
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1223,6 +1223,7 @@
12241224 'revdelete-hid' => 'hid $1',
12251225 'revdelete-unhid' => 'unhid $1',
12261226 'revdelete-log-message' => '$1 for $2 {{PLURAL:$2|revision|revisions}}',
 1227+'logdelete-log-message' => '$1 for $2 {{PLURAL:$2|event|events}}',
12271228
12281229 # Suppression log
12291230 'suppressionlog' => 'Suppression log',

Status & tagging log