Index: trunk/phase3/includes/Title.php |
— | — | @@ -1979,14 +1979,14 @@ |
1980 | 1980 | * @return \type{\int} |
1981 | 1981 | */ |
1982 | 1982 | public function getLatestRevID( $flags = 0 ) { |
1983 | | - if ($this->mLatestID !== false) |
| 1983 | + if( $this->mLatestID !== false ) |
1984 | 1984 | return $this->mLatestID; |
1985 | 1985 | |
1986 | 1986 | $db = ($flags & GAID_FOR_UPDATE) ? wfGetDB(DB_MASTER) : wfGetDB(DB_SLAVE); |
1987 | | - return $this->mLatestID = $db->selectField( 'revision', |
1988 | | - "max(rev_id)", |
1989 | | - array('rev_page' => $this->getArticleID($flags)), |
1990 | | - 'Title::getLatestRevID' ); |
| 1987 | + $this->mLatestID = $db->selectField( 'page', 'page_latest', |
| 1988 | + array( 'page_namespace' => $this->getNamespace(), 'page_title' => $this->getDBKey() ), |
| 1989 | + __METHOD__ ); |
| 1990 | + return $this->mLatestID; |
1991 | 1991 | } |
1992 | 1992 | |
1993 | 1993 | /** |