mediawiki-extensions-Scribunto/includes/engines/LuaCommon
Brad Jorsch 1617bb3deb Return correct frame from mw.getCurrentFrame in certain edge cases
When an #invoke is passed as an argument to another #invoke,
mw.getCurrentFrame() at module scope will return the wrong frame.

On the PHP side, we need to always reset the frame when processing
an #invoke, not just when there's no frame already. I don't remember why
I82dde43e wasn't done that way, but changing it doesn't make any tests
fail and Scribunto tends to have good tests.

On the Lua side, we need to do the same. The logic wih mw.getCurrentFrame()
using a global that gets stored, modified, and reset in several places
was getting confusing, so this patch reworks the logic to inject a
globalless mw.getCurrentFrame() into each #invoke's cloned environment
instead.

Bug: T234368
Change-Id: I8cb5bc4dc14c9b448c9f267e0539daa75e72af4c
2019-10-14 02:39:13 +00:00
..
lualib Return correct frame from mw.getCurrentFrame in certain edge cases 2019-10-14 02:39:13 +00:00
HashLibrary.php Add method scope visibility 2018-11-19 21:18:12 +00:00
HtmlLibrary.php Add method scope visibility 2018-11-19 21:18:12 +00:00
LanguageLibrary.php Get GenderCache from MediaWikiServices 2019-08-21 17:13:43 +00:00
LibraryBase.php Add method scope visibility 2018-11-19 21:18:12 +00:00
LuaCommon.php Return correct frame from mw.getCurrentFrame in certain edge cases 2019-10-14 02:39:13 +00:00
LuaInterpreter.php Use PHP 7 variadic params for LuaInterpreter::callFunction() 2019-03-20 21:17:45 -07:00
MessageLibrary.php Add method scope visibility 2018-11-19 21:18:12 +00:00
SiteLibrary.php Fix @return for SiteLibrary::pagesInCategory() 2019-03-20 21:18:51 -07:00
TextLibrary.php Add method scope visibility 2018-11-19 21:18:12 +00:00
TitleLibrary.php Use "vary-revision-sha1" over "vary-revision" in getContentInternal() 2019-07-18 01:48:12 +00:00
UriLibrary.php Add method scope visibility 2018-11-19 21:18:12 +00:00
UstringLibrary.php Upgrade to newer phan 2019-03-20 21:19:37 -07:00