Hoo man has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/355095 )
Change subject: Lua documentation: Loading a cached entity is not expensive ...................................................................... Lua documentation: Loading a cached entity is not expensive See the local function getEntityObject in client/includes/DataAccess/Scribunto/mw.wikibase.lua for details about that. Also applied changes done to the documentation on mediawiki.org: https://www.mediawiki.org/w/index.php?diff=2370348 Change-Id: I724b05e92b5587d6fd9d6b54d282183e70265f60 --- M docs/lua.wiki 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/95/355095/1 diff --git a/docs/lua.wiki b/docs/lua.wiki index 86b262e..8a03edb 100644 --- a/docs/lua.wiki +++ b/docs/lua.wiki @@ -8,7 +8,7 @@ === mw.wikibase.getEntity === <code>wikibase.getEntity()</code><br> <code>wikibase.getEntity( id )</code><br> -:<span style="color: red;">This function is [[mw:Manual:$wgExpensiveParserFunctionLimit|expensive]] when called with the id of an entity not connected to the current page.</span> +:<span style="color: red;">This function is [[mw:Manual:$wgExpensiveParserFunctionLimit|expensive]] when called with the id of an entity not connected to the current page.</span> Loading entities doesn't count as expensive if the same entity is loaded twice during a module run, unless more than 14 other entities have been loaded in between. Gets a [[#mw.wikibase.entity|mw.wikibase.entity]] table with data of the Wikibase item requested by id. If no id was given, the item connected to the current page will be returned. Requesting an item by id is only supported if arbitrary access is enabled. @@ -100,7 +100,7 @@ An example call might look like this: <source lang="lua"> -local entity = mw.wikibase.getEntityObject() +local entity = mw.wikibase.getEntity() local snak = entity['claims']['P342'][1]['qualifiers']['P342'][1] mw.wikibase.renderSnak( snak ) -- Returns the given Snak value formatted as wikitext escaped plain text. @@ -112,7 +112,7 @@ An example call might look like this: <source lang="lua"> -local entity = mw.wikibase.getEntityObject() +local entity = mw.wikibase.getEntity() local snak = entity['claims']['P342'][1]['qualifiers']['P342'][1] mw.wikibase.formatValue( snak ) -- Returns the given Snak value formatted as rich wikitext. @@ -124,7 +124,7 @@ An example call might look like this: <source lang="lua"> -local entity = mw.wikibase.getEntityObject() +local entity = mw.wikibase.getEntity() local snaks = entity['claims']['P342'][1]['qualifiers'] mw.wikibase.renderSnaks( snaks ) -- Returns the given Snak values formatted as wikitext escaped plain text. @@ -136,7 +136,7 @@ An example call might look like this: <source lang="lua"> -local entity = mw.wikibase.getEntityObject() +local entity = mw.wikibase.getEntity() local snaks = entity['claims']['P342'][1]['qualifiers'] mw.wikibase.formatValues( snaks ) -- Returns the given Snak values formatted as rich wikitext. @@ -171,7 +171,7 @@ </source> == mw.wikibase.entity == -<code>mw.wikibase.entity</code> represents a Wikibase entity in Lua. A <code>mw.wikibase.entity</code> table for the item which is linked with the current page can be obtained with [[#mw.wikibase.getEntityObject|<code>mw.wikibase.getEntityObject</code>]]. +<code>mw.wikibase.entity</code> represents a Wikibase entity in Lua. A <code>mw.wikibase.entity</code> table for the item which is linked with the current page can be obtained with [[#mw.wikibase.getEntity|<code>mw.wikibase.getEntity</code>]]. Functions documented as <code>mw.wikibase.entity.name</code> are available on the global <code>mw.wikibase.entity</code> table; functions documented as <code>mw.wikibase.entity:name</code> are methods of an <code>mw.wikibase.entity</code> object (see [[#mw.wikibase.entity.create|<code>mw.wikibase.entity.create</code>]]). -- To view, visit https://gerrit.wikimedia.org/r/355095 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I724b05e92b5587d6fd9d6b54d282183e70265f60 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Hoo man <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
