From: Alexandre Emsenhuber Date: Fri, 18 Jan 2013 21:17:06 +0000 (+0100) Subject: Use better variable name in CoreParserFunctions::pagesize() X-Git-Tag: 1.31.0-rc.0~20960^2 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=782ea7acae8242983e7b20e13bb6908c7021b410;p=lhc%2Fweb%2Fwiklou.git Use better variable name in CoreParserFunctions::pagesize() Also moved the retrieval of the revision ID near the one of the page ID so that the call of ParserOutput::addTemplate() is much clearer than the actual one. Change-Id: Ie71ee76e90cc131eac25c0f339d5250d5163ce2e --- diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index fa934d789c..b77309b987 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -662,11 +662,12 @@ class CoreParserFunctions { $length = $cache[$page]; } elseif( $parser->incrementExpensiveFunctionCount() ) { $rev = Revision::newFromTitle( $title, false, Revision::READ_NORMAL ); - $id = $rev ? $rev->getPage() : 0; + $pageID = $rev ? $rev->getPage() : 0; + $revID = $rev ? $rev->getId() : 0; $length = $cache[$page] = $rev ? $rev->getSize() : 0; // Register dependency in templatelinks - $parser->mOutput->addTemplate( $title, $id, $rev ? $rev->getId() : 0 ); + $parser->mOutput->addTemplate( $title, $pageID, $revID ); } return self::formatRaw( $length, $raw ); }