(bug 24037) Add byte length of revision to Special:Contributions. Patch by Umherirrender
authorRoan Kattouw <catrope@users.mediawiki.org>
Sun, 20 Nov 2011 18:17:49 +0000 (18:17 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sun, 20 Nov 2011 18:17:49 +0000 (18:17 +0000)
RELEASE-NOTES-1.19
includes/specials/SpecialContributions.php

index f04b047..b92622d 100644 (file)
@@ -90,6 +90,7 @@ production.
   for an IP address redirects to the contributions list for that IP
 * (bug 8859) Database::update should take array of tables too
 * (bug 19698) Inverse selection for Special:Contributions
+* (bug 24037) Add byte length of revision to Special:Contributions
 
 === Bug fixes in 1.19 ===
 * $wgUploadNavigationUrl should be used for file redlinks if
index a86bb29..6c732cb 100644 (file)
@@ -712,6 +712,12 @@ class ContribsPager extends ReverseChronologicalPager {
                        $mflag = '';
                }
 
+               if ( !is_null( $rev->getSize() ) && !$rev->isDeleted( Revision::DELETED_TEXT ) ) {
+                       $mSize = $this->getSkin()->formatRevisionSize( $rev->getSize() );
+               } else {
+                       $mSize = '';
+               }
+
                // Don't show useless link to people who cannot hide revisions
                $canHide = $user->isAllowed( 'deleterevision' );
                if( $canHide || ($rev->getVisibility() && $user->isAllowed('deletedhistory')) ) {
@@ -732,7 +738,7 @@ class ContribsPager extends ReverseChronologicalPager {
                }
 
                $diffHistLinks = '(' . $difftext . $this->messages['pipe-separator'] . $histlink . ')';
-               $ret = "{$del}{$d} {$diffHistLinks}{$chardiff}{$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
+               $ret = "{$del}{$d} {$diffHistLinks}{$chardiff}{$nflag}{$mflag} {$link}{$userlink} {$mSize} {$comment} {$topmarktext}";
 
                # Denote if username is redacted for this edit
                if( $rev->isDeleted( Revision::DELETED_USER ) ) {