r96328 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96327‎ | r96328 | r96329 >
Date:13:17, 6 September 2011
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Use $this->mAttribs['rc_old_len'] and $this->mAttribs['rc_new_len'] instead of $this->mExtra['oldSize'] and $this->mExtra['newSize']
Modified paths:
  • /trunk/phase3/includes/RecentChange.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
@@ -710,8 +710,8 @@
711711 $url .= $query;
712712 }
713713
714 - if( isset( $this->mExtra['oldSize'] ) && isset( $this->mExtra['newSize'] ) ) {
715 - $szdiff = $this->mExtra['newSize'] - $this->mExtra['oldSize'];
 714+ if( $this->mAttribs['rc_old_len'] !== null && $this->mAttribs['rc_new_len'] !== null ) {
 715+ $szdiff = $this->mAttribs['rc_new_len'] - $this->mAttribs['rc_old_len'];
716716 if($szdiff < -500) {
717717 $szdiff = "\002$szdiff\002";
718718 } elseif($szdiff >= 0) {

Comments

#Comment by Aaron Schulz (talk | contribs)   21:25, 28 September 2011

What still uses size parameters in mExtra?

#Comment by IAlex (talk | contribs)   09:35, 29 September 2011

I don't think there's anything using them. I could have removed them.

Status & tagging log