Aaron Schulz has submitted this change and it was merged.
Change subject: (bug 22808) Don't count "expensive" calls for cached titles
......................................................................
(bug 22808) Don't count "expensive" calls for cached titles
Bug: 22808
Change-Id: Ie4dd9fd647dc79a2b31bc44ef8b6a641b54cfb78
---
M ParserFunctions_body.php
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Aaron Schulz: Verified; Looks good to me, approved
Siebrand: Looks good to me, but someone else must approve
diff --git a/ParserFunctions_body.php b/ParserFunctions_body.php
index 967e833..3567cc5 100644
--- a/ParserFunctions_body.php
+++ b/ParserFunctions_body.php
@@ -360,9 +360,6 @@
return $else;
} else {
$pdbk = $title->getPrefixedDBkey();
- if (
!$parser->incrementExpensiveFunctionCount() ) {
- return $else;
- }
$lc = LinkCache::singleton();
$id = $lc->getGoodLinkID( $pdbk );
if ( $id != 0 ) {
@@ -372,6 +369,9 @@
$parser->mOutput->addLink( $title, 0 );
return $else;
}
+ if (
!$parser->incrementExpensiveFunctionCount() ) {
+ return $else;
+ }
$id = $title->getArticleID();
$parser->mOutput->addLink( $title, $id );
if ( $id ) {
--
To view, visit https://gerrit.wikimedia.org/r/65828
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4dd9fd647dc79a2b31bc44ef8b6a641b54cfb78
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ParserFunctions
Gerrit-Branch: master
Gerrit-Owner: Liangent <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits