r88023 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88022‎ | r88023 | r88024 >
Date:23:08, 13 May 2011
Author:freakolowsky
Status:reverted (Comments)
Tags:
Comment:
* bug 28571
* Not sure about this one: the index i changed is defined as ar_usertext_timestamp in tables.sql, but created and used as usertext_timestamp.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php
@@ -63,7 +63,7 @@
6464 'tables' => array( 'archive' ),
6565 'fields' => array(
6666 'ar_rev_id', 'ar_namespace', 'ar_title', 'ar_timestamp', 'ar_comment', 'ar_minor_edit',
67 - 'ar_user', 'ar_user_text', 'ar_deleted'
 67+ 'ar_user', 'ar_user_text', 'ar_deleted', 'ar_len'
6868 ),
6969 'conds' => $conds,
7070 'options' => array( 'USE INDEX' => $index )
@@ -74,7 +74,7 @@
7575 $condition = array();
7676
7777 $condition['ar_user_text'] = $this->target;
78 - $index = 'usertext_timestamp';
 78+ $index = array( 'archive' => 'ar_usertext_timestamp' );
7979
8080 return array( $index, $condition );
8181 }
@@ -235,7 +235,8 @@
236236 wfMsg( 'parentheses', $wgLang->pipeList( array( $last, $dellog, $reviewlink ) ) )
237237 );
238238
239 - $ret = "{$del}{$link} {$tools} . . {$mflag} {$pagelink} {$comment}";
 239+ $diffOut = ' . . '.ChangesList::showCharacterDifference( $row->ar_len, 0 );
 240+ $ret = "{$del}{$link} {$tools} . . {$mflag} {$diffOut} {$pagelink} {$comment}";
240241
241242 # Denote if username is redacted for this edit
242243 if( $rev->isDeleted( Revision::DELETED_USER ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r96522Reverted r88023 per CRaaron23:41, 7 September 2011

Comments

#Comment by Duplicatebug (talk | contribs)   09:53, 14 May 2011

ar_len contains the size of the archived revision, so it is bad to use ChangesList::showCharacterDifference, because there is no difference. You can use Linker::formatRevisionSize to show the size of that revision.

There are also many ' . . '.

#Comment by Freakolowsky (talk | contribs)   10:56, 14 May 2011

But it would be nice for page and SpecialContributions to have somewhat consistent output ... the thing is formatRevisionSize outputs (X bytes) whereas showCharacterDifference outputs (+/-X) ... would be nice if both would use either the same function or add the bytes keyword to the diff function.

#Comment by Duplicatebug (talk | contribs)   18:29, 14 May 2011

In my opinion is that another issue, which can you fix, if you think that is necessary. But showing the bytes as always a negative number is bad. Thanks for r88048.

#Comment by Aaron Schulz (talk | contribs)   06:03, 22 June 2011

On enwiki's DB, the INDEX is called 'usertext_timestamp'. Unfortunate that the new MW installs have different index names (the revision PK is like this too). I guess someone should rename the older WMF site ones :)

#Comment by Duplicatebug (talk | contribs)   16:12, 22 June 2011

Index renamed in r45764. In Database::indexName is some back-compat-code. See also r45891.

Status & tagging log