Jackmcbarn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/163458

Change subject: Don't clobber revision size of 0
......................................................................

Don't clobber revision size of 0

When a revision's size is 0, don't clobber it by changing it to null. This
causes, among other things, moves of empty pages to not show a revision
size. If we get to where the else used to be, either mSize is 0 (and doing
nothing is correct), or mSize is already null, in which case this didn't
do anything anyway. We know this because, above, we initialized it with
$this->mSize = isset( $row['len'] ) ? intval( $row['len'] ) : null;

Change-Id: I3d9b9163368c57b9a7906f6569119081b945d57e
---
M includes/Revision.php
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/163458/1

diff --git a/includes/Revision.php b/includes/Revision.php
index 28a825d..f1c04f1 100644
--- a/includes/Revision.php
+++ b/includes/Revision.php
@@ -681,9 +681,6 @@
                        if ( !$this->mSize ) {
                                if ( $this->mContent !== null ) {
                                        $this->mSize = 
$this->mContent->getSize();
-                               } else {
-                                       #NOTE: this should never happen if we 
have either text or content object!
-                                       $this->mSize = null;
                                }
                        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/163458
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d9b9163368c57b9a7906f6569119081b945d57e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jackmcbarn <jackmcb...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to