Brian Wolff has uploaded a new change for review.
Change subject: {{PAGESIZE:{{FULLPAGENAME}}}}, {{{{FULLPAGENAME}}}} not outdated
......................................................................
{{PAGESIZE:{{FULLPAGENAME}}}}, {{{{FULLPAGENAME}}}} not outdated
Previously, when parsing {{PAGESIZE:{{FULLPAGENAME}}}} or
{{ {{FULLPAGENAME}} }} (a self-transclusion), we used the
version currently in the db, which is outdated because
the moment we save the page there will be a new version.
This often causes confusion when testing templates that
often have examples of template use in the doc section
which would be one version out of date.
This change causes those variables to give results for
the most recent version of the page.
Possible negative side effect: {{PAGESIZE:<cur page>}}
is now considered an expensive parser function every time
its included on a page, instead of just the first time.
This is because I had to disable the in-process cache
of revision sizes for the current page, since in this
situation we would be parsing the same page twice in
the same request, and we don't want to use the
in-process cache the second time, or it would
defeat the point.
(If its a big issue, could be worked around
by adding code to Parser::clearState to clear
the in-process cache just for the current page).
bug: 39590
Change-Id: Idfac13de37d05317f65e4131534543e66cf74873
---
M RELEASE-NOTES-1.21
M includes/parser/CoreParserFunctions.php
M includes/parser/Parser.php
3 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/51/44151/1
--
To view, visit https://gerrit.wikimedia.org/r/44151
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfac13de37d05317f65e4131534543e66cf74873
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits