Last modified: 2014-01-21 00:01:19 UTC
I'd like to request that a method be added to determine from within Lua what Module name was present in the invoke instruction, i.e. {{ #invoke: MyModule | test }} I'd like the called function to be able to determine that MyModule is the origin of the call. My use case for this is being able to differentiate behavior for: {{ #invoke: MyModule | test }} and {{ #invoke: MyModule/sandbox | test }} Where the sandbox is likely to contain near identical code to the main Module but you might want it to do something different (e.g. add extra diagnostic output, include the /sandbox version other modules rather than the main version, etc.) The most natural way that I can see to do this is to have the Lua function look for "/sandbox" in the name of the invoked Module, but there doesn't seem to be any way at present for Lua to know what Module was being invoked.
Change 99797 had a related patch set uploaded by Anomie: Expose PPFrame::getTitle to Lua https://gerrit.wikimedia.org/r/99797
Change 99797 merged by jenkins-bot: Expose PPFrame::getTitle to Lua https://gerrit.wikimedia.org/r/99797
Change has been merged. It should be deployed to WMF wikis with 1.23wmf7, see https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.