Index: trunk/phase3/includes/PageHistory.php |
— | — | @@ -530,23 +530,22 @@ |
531 | 531 | $dbr = wfGetDB( DB_SLAVE ); |
532 | 532 | |
533 | 533 | if ($direction == PageHistory::DIR_PREV) |
534 | | - list($dirs, $oper) = array("ASC", ">="); |
| 534 | + list($dirs, $oper) = array("ASC", ">="); |
535 | 535 | else /* $direction == PageHistory::DIR_NEXT */ |
536 | | - list($dirs, $oper) = array("DESC", "<="); |
| 536 | + list($dirs, $oper) = array("DESC", "<="); |
537 | 537 | |
538 | 538 | if ($offset) |
539 | | - $offsets = array("rev_timestamp $oper '$offset'"); |
| 539 | + $offsets = array("rev_timestamp $oper '$offset'"); |
540 | 540 | else |
541 | | - $offsets = array(); |
| 541 | + $offsets = array(); |
542 | 542 | |
543 | 543 | $page_id = $this->mTitle->getArticleID(); |
544 | 544 | |
545 | | - return $dbr->select( |
546 | | - 'revision', |
547 | | - Revision::selectFields(), |
548 | | - array_merge(array("rev_page=$page_id"), $offsets), |
549 | | - __METHOD__, |
550 | | - array('ORDER BY' => "rev_timestamp $dirs", |
| 545 | + return $dbr->select( 'revision', |
| 546 | + Revision::selectFields(), |
| 547 | + array_merge(array("rev_page=$page_id"), $offsets), |
| 548 | + __METHOD__, |
| 549 | + array( 'ORDER BY' => "rev_timestamp $dirs", |
551 | 550 | 'USE INDEX' => 'page_timestamp', 'LIMIT' => $limit) |
552 | 551 | ); |
553 | 552 | } |