r103770 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103769‎ | r103770 | r103771 >
Date:18:17, 20 November 2011
Author:catrope
Status:reverted (Comments)
Tags:
Comment:
(bug 24037) Add byte length of revision to Special:Contributions. Patch by Umherirrender
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -90,6 +90,7 @@
9191 for an IP address redirects to the contributions list for that IP
9292 * (bug 8859) Database::update should take array of tables too
9393 * (bug 19698) Inverse selection for Special:Contributions
 94+* (bug 24037) Add byte length of revision to Special:Contributions
9495
9596 === Bug fixes in 1.19 ===
9697 * $wgUploadNavigationUrl should be used for file redlinks if
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -712,6 +712,12 @@
713713 $mflag = '';
714714 }
715715
 716+ if ( !is_null( $rev->getSize() ) && !$rev->isDeleted( Revision::DELETED_TEXT ) ) {
 717+ $mSize = $this->getSkin()->formatRevisionSize( $rev->getSize() );
 718+ } else {
 719+ $mSize = '';
 720+ }
 721+
716722 // Don't show useless link to people who cannot hide revisions
717723 $canHide = $user->isAllowed( 'deleterevision' );
718724 if( $canHide || ($rev->getVisibility() && $user->isAllowed('deletedhistory')) ) {
@@ -732,7 +738,7 @@
733739 }
734740
735741 $diffHistLinks = '(' . $difftext . $this->messages['pipe-separator'] . $histlink . ')';
736 - $ret = "{$del}{$d} {$diffHistLinks}{$chardiff}{$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
 742+ $ret = "{$del}{$d} {$diffHistLinks}{$chardiff}{$nflag}{$mflag} {$link}{$userlink} {$mSize} {$comment} {$topmarktext}";
737743
738744 # Denote if username is redacted for this edit
739745 if( $rev->isDeleted( Revision::DELETED_USER ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r103993Revert r103770 (bug 24037) -- added full-page size to Special:Contribs which ...brion00:48, 23 November 2011
r112183release-notes-1.19...krinkle02:43, 23 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88008* bug 24037freakolowsky17:11, 13 May 2011

Comments

#Comment by IAlex (talk | contribs)   18:55, 20 November 2011

Linker::formatRevisionSize() is static, you don't need to use $this->getSkin().

#Comment by Brion VIBBER (talk | contribs)   00:39, 23 November 2011

Original request is "Please add the bytes of each revision to Special:Contributions like the history. Thanks."

but.... there doesn't seem to be a listing of the full byte size of revisions on history. I only see the differential char count change, which is already visible.

#Comment by Brion VIBBER (talk | contribs)   00:43, 23 November 2011

Note that it *is* in there on 1.18, but not in 1.19/trunk.

#Comment by Aaron Schulz (talk | contribs)   00:44, 23 November 2011

It think it *should* show the diff size, as with RC/history...regardless of the original request.

#Comment by Brion VIBBER (talk | contribs)   00:45, 23 November 2011

It already shows the diff size; this rev adds the whole-size-of-entire-revision.

#Comment by Aaron Schulz (talk | contribs)   00:47, 23 November 2011

Oh wait...yes. Yeah that sucks then. I don't think we need the whole byte size. I could talk to Brandon about it. Looks like clutter IMO.

#Comment by Brion VIBBER (talk | contribs)   00:49, 23 November 2011

Agreed; I've reverted this for now and will add a note on the original bug that current trunk state shows the diff size in both places.

#Comment by Catrope (talk | contribs)   10:21, 23 November 2011

For the record, this isn't a misunderstanding, this does exactly what the reporter and the patch submitter wanted it to do. But if you guys feel it's clutter, I'm happy to keep it out.

Status & tagging log