r28785 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28784‎ | r28785 | r28786 >
Date:23:26, 22 December 2007
Author:nikerabbit
Status:old
Tags:
Comment:
* Optimise for speed and memory
Modified paths:
  • /trunk/extensions/Translate/SpecialTranslationChanges.php (modified) (history)
  • /trunk/extensions/Translate/Translate.i18n.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/Translate.i18n.php
@@ -60,7 +60,7 @@
6161
6262 'translationchanges' => 'Translation changes',
6363 'translationchanges-export' => 'export',
64 - 'translationchanges-change' => '$1: [[Mediawiki:$2|$2]] by [[User:$3|$3]]',
 64+ 'translationchanges-change' => '$1: $2 by $3',
6565
6666 'translate-page-no-such-language' => 'Invalid language code was supplied',
6767 );
Index: trunk/extensions/Translate/SpecialTranslationChanges.php
@@ -32,7 +32,9 @@
3333 #$cutoff_unixtime = $cutoff_unixtime - ($cutoff_unixtime % 86400);
3434 $cutoff = $dbr->timestamp( $cutoff_unixtime );
3535
36 - $sql = "SELECT *, substring_index(rc_title, '/', -1) as lang FROM $recentchanges " .
 36+ $fields = 'rc_title, rc_timestamp, rc_user_text';
 37+
 38+ $sql = "SELECT $fields, substring_index(rc_title, '/', -1) as lang FROM $recentchanges " .
3739 "WHERE rc_timestamp >= '{$cutoff}' " .
3840 "AND rc_namespace = 8 " .
3941 "ORDER BY lang ASC, rc_timestamp DESC";
@@ -167,7 +169,7 @@
168170
169171 foreach ( $rows as $row ) {
170172 $date = $wgLang->timeAndDate( $row->rc_timestamp, /* adj */ true, /* format */ true );
171 - $msg = wfMsgExt( self::MSG . 'change', array( 'parseinline' ),
 173+ $msg = wfMsgExt( self::MSG . 'change', array( 'parsemag' ),
172174 $date, wfEscapeWikiText($row->rc_title), wfEscapeWikiText($row->rc_user_text)
173175 );
174176 $output .= Xml::tags( 'li', null, $msg );

Status & tagging log