}
// Fail nicely if article doesn't exist.
- if ( !$this->getTitle()->exists() ) {
+ if ( !$this->page->exists() ) {
$out->addWikiMsg( 'nohistory' );
# show deletion/move log if there is an entry
LogEventsList::showLogExtract(
$offsets = array();
}
- $page_id = $this->getTitle()->getArticleID();
+ $page_id = $this->page->getId();
return $dbr->select( 'revision',
Revision::selectFields(),
'tables' => array( 'revision', 'user' ),
'fields' => array_merge( Revision::selectFields(), Revision::selectUserFields() ),
'conds' => array_merge(
- array( 'rev_page' => $this->getTitle()->getArticleID() ),
+ array( 'rev_page' => $this->getWikiPage()->getId() ),
$this->conds ),
'options' => array( 'USE INDEX' => array( 'revision' => 'page_timestamp' ) ),
'join_conds' => array(
$cur,
array(),
array(
- 'diff' => $this->getTitle()->getLatestRevID(),
+ 'diff' => $this->getWikiPage()->getLatest(),
'oldid' => $rev->getId()
)
);
# output previous revision, or nothing if there isn't one
if( !$oldid ) {
# get the current revision so we can get the penultimate one
- $oldid = $this->getTitle()->getLatestRevID();
+ $oldid = $this->page->getLatest();
}
$prev = $this->getTitle()->getPreviousRevisionId( $oldid );
$oldid = $prev ? $prev : -1 ;