From: Aaron Schulz Date: Fri, 1 Jul 2011 23:46:20 +0000 (+0000) Subject: Fixed bogus $conds in r91327 X-Git-Tag: 1.31.0-rc.0~29114 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=cc7eac0320babec6a0c7a304546c58b03b0dcc1c;p=lhc%2Fweb%2Fwiklou.git Fixed bogus $conds in r91327 --- diff --git a/includes/Revision.php b/includes/Revision.php index fa560d30d4..93e6a05484 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -40,7 +40,7 @@ class Revision { public static function newFromTitle( $title, $id = 0 ) { $conds = array( 'page_namespace' => $title->getNamespace(), - 'page_title' => $title->getDBkey() + 'page_title' => $title->getDBkey() ); if ( $id ) { // Use the specified ID @@ -73,7 +73,7 @@ class Revision { public static function newFromPageId( $pageId, $revId = 0 ) { $conds = array( 'page_id' => $pageId ); if ( $revId ) { - $conds['rev_id'] = $pageId; + $conds['rev_id'] = $revId; } elseif ( wfGetLB()->getServerCount() > 1 ) { // Get the latest revision ID from the master $dbw = wfGetDB( DB_MASTER ); @@ -85,6 +85,7 @@ class Revision { } else { $conds[] = 'rev_id = page_latest'; } + $conds[] = 'page_id=rev_page'; return Revision::newFromConds( $conds ); }