r20472 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20471‎ | r20472 | r20473 >
Date:00:48, 15 March 2007
Author:aaron
Status:old
Tags:
Comment:
*Null revisions no longer have an "empty" rev_len, remove redundant check
Modified paths:
  • /trunk/phase3/includes/Revision.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Revision.php
@@ -316,7 +316,7 @@
317317 $this->mMinorEdit = isset( $row['minor_edit'] ) ? intval( $row['minor_edit'] ) : 0;
318318 $this->mTimestamp = isset( $row['timestamp'] ) ? strval( $row['timestamp'] ) : wfTimestamp( TS_MW );
319319 $this->mDeleted = isset( $row['deleted'] ) ? intval( $row['deleted'] ) : 0;
320 - $this->mSize = isset( $row['len'] ) ? intval( $row['len'] ) : 0;
 320+ $this->mSize = isset( $row['len'] ) ? intval( $row['len'] ) : null;
321321
322322 // Enforce spacing trimming on supplied text
323323 $this->mComment = isset( $row['comment'] ) ? trim( strval( $row['comment'] ) ) : null;
@@ -712,7 +712,7 @@
713713 'rev_user_text' => $this->mUserText,
714714 'rev_timestamp' => $dbw->timestamp( $this->mTimestamp ),
715715 'rev_deleted' => $this->mDeleted,
716 - 'rev_len' => ( $this->mSize ) ? $this->mSize : strlen($this->mText),
 716+ 'rev_len' => $this->mSize,
717717 ), $fname
718718 );
719719