r91328 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91327‎ | r91328 | r91329 >
Date:23:46, 1 July 2011
Author:aaron
Status:ok
Tags:
Comment:
Fixed bogus $conds in r91327
Modified paths:
  • /trunk/phase3/includes/Revision.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Revision.php
@@ -40,7 +40,7 @@
4141 public static function newFromTitle( $title, $id = 0 ) {
4242 $conds = array(
4343 'page_namespace' => $title->getNamespace(),
44 - 'page_title' => $title->getDBkey()
 44+ 'page_title' => $title->getDBkey()
4545 );
4646 if ( $id ) {
4747 // Use the specified ID
@@ -73,7 +73,7 @@
7474 public static function newFromPageId( $pageId, $revId = 0 ) {
7575 $conds = array( 'page_id' => $pageId );
7676 if ( $revId ) {
77 - $conds['rev_id'] = $pageId;
 77+ $conds['rev_id'] = $revId;
7878 } elseif ( wfGetLB()->getServerCount() > 1 ) {
7979 // Get the latest revision ID from the master
8080 $dbw = wfGetDB( DB_MASTER );
@@ -85,6 +85,7 @@
8686 } else {
8787 $conds[] = 'rev_id = page_latest';
8888 }
 89+ $conds[] = 'page_id=rev_page';
8990 return Revision::newFromConds( $conds );
9091 }
9192

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91327* Fixed getLatest() check in Article...aaron23:33, 1 July 2011

Status & tagging log