Utilisateur:Mathompson

De Semantic MediaWiki - Sandbox

Semantic Scribunto invocation

Invocation:

{{#invoke:ScribuntoTest|asktype}}

After fix, this should contain information from the first item in the query result set:

mw.ext.smw module not found

Explanation

The invocation returns a number that is the "query-continue-offset" value for the query result. This is because the first element in the array returned by the PHP code for the extension is the "query-continue-offset" value. If the entire result object is wrapped in another array, the Lua code will receive the entire result array (which will be of type "table" once Lua has it) from the PHP code (because that array is now the first element of the return value.)

The "ScribuntoTest" module that I wrote for the purposes of testing will return some information from the first query result when it receives a table from the PHP code, and otherwise returns the value it received from the PHP code directly.

Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.