r44442 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44441‎ | r44442 | r44443 >
Date:01:28, 11 December 2008
Author:aaron
Status:deferred (Comments)
Tags:
Comment:
May as well set article ID in title
Modified paths:
  • /trunk/phase3/includes/Revision.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Revision.php
@@ -319,9 +319,9 @@
320320 $this->mSize = intval( $row->rev_len );
321321
322322 if( isset( $row->page_latest ) ) {
323 - $this->mCurrent = ( $row->rev_id == $row->page_latest );
324 - $this->mTitle = Title::makeTitle( $row->page_namespace,
325 - $row->page_title );
 323+ $this->mCurrent = ( $row->rev_id == $row->page_latest );
 324+ $this->mTitle = Title::makeTitle( $row->page_namespace, $row->page_title );
 325+ $this->mTitle->resetArticleID( $this->mPage );
326326 } else {
327327 $this->mCurrent = false;
328328 $this->mTitle = null;

Follow-up revisions

RevisionCommit summaryAuthorDate
r76261Fix r44442: don't rest restriction fieldsaaron18:50, 7 November 2010

Comments

#Comment by Brion VIBBER (talk | contribs)   18:08, 11 December 2008

Might consider Title::newFromRow() here which could grab additional fields while we're at it like the page size and latest version; though it might be necessary to fudge some of those fields around.

#Comment by Nikerabbit (talk | contribs)   19:45, 17 August 2010

Title::resetArticleID also resets restrictions, causing them to be reloaded every time when the same revision is loaded.

Status & tagging log