Go to file
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
.phan Remove PHP entry point 2019-06-21 00:02:08 +00:00
i18n Localisation updates from https://translatewiki.net. 2019-10-08 09:34:21 +02:00
includes Return correct frame from mw.getCurrentFrame in certain edge cases 2019-10-14 02:39:13 +00:00
modules build: Update eslint-config-wikimedia from 0.8.1 to 0.11.0 2019-04-12 13:00:29 -07:00
tests Return correct frame from mw.getCurrentFrame in certain edge cases 2019-10-14 02:39:13 +00:00
.eslintrc.json build: Set "root": true, in .eslintrc.json 2018-12-17 18:58:09 -08:00
.gitignore build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint 2019-05-07 10:40:41 -07:00
.gitreview
.minus-x.json Move classes into includes/ 2018-04-09 08:54:22 -07:00
.phpcs.xml build: Upgrade mediawiki-codesniffer to v28.0.0 2019-10-11 11:31:29 -07:00
.stylelintrc.json Use json extension for .stylelintrc 2017-08-19 10:27:54 +02:00
CODE_OF_CONDUCT.md build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-03 21:33:35 +00:00
composer.json build: Upgrade mediawiki-codesniffer to v28.0.0 2019-10-11 11:31:29 -07:00
COPYING
extension.json Split LuaEngineTestBase to LuaEngineUnitTestBase and LuaEngineTestBase 2019-08-31 10:51:26 +02:00
Gruntfile.js build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint 2019-05-07 10:40:41 -07:00
package-lock.json build: Updating eslint-utils to 1.4.2 2019-08-23 04:16:35 +00:00
package.json build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint 2019-05-07 10:40:41 -07:00
Scribunto.constants.php Remove PHP entry point 2019-06-21 00:02:08 +00:00
Scribunto.magic.php
Scribunto.namespaces.php Add Namespaces translation for Punjabi 2019-07-02 08:46:49 +00:00