Use Revision::isCurrent() in ApiParse.

We have a loaded Revision object so we may use that
method as well.

Change-Id: Ie8bb871f8874871d7df3111d39ba23a01769cd34
This commit is contained in:
Alexandre Emsenhuber 2012-09-17 20:14:27 +02:00
parent e13808da00
commit 14d159af7e

View file

@ -91,7 +91,7 @@ class ApiParse extends ApiBase {
$popts->enableLimitReport( !$params['disablepp'] );
// If for some reason the "oldid" is actually the current revision, it may be cached
if ( $titleObj->getLatestRevID() === intval( $oldid ) ) {
if ( $rev->isCurrent() ) {
// May get from/save to parser cache
$p_result = $this->getParsedSectionOrText( $pageObj, $popts, $pageid,
isset( $prop['wikitext'] ) ) ;