From 14d159af7e812cfba27220eba2b61ba6ca2b3e09 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 17 Sep 2012 20:14:27 +0200 Subject: [PATCH] Use Revision::isCurrent() in ApiParse. We have a loaded Revision object so we may use that method as well. Change-Id: Ie8bb871f8874871d7df3111d39ba23a01769cd34 --- includes/api/ApiParse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index db6e2bb8b0..2fcdc38824 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -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'] ) ) ; -- 2.20.1