Moduł:Kontrola autorytatywna/temp
Wygląd
Dokumentacja modułu
[stwórz] [ ]
Zobacz podstrony tego modułu.
|
require("strict")
return {
["Engage2"] = function (frame)
local entityId = frame.args[1]
if not entityId then
return
end
local group = false
local idGroupOfHumans = 'Q16334295'
for i, v in ipairs(mw.wikibase.getBestStatements(entityId, "P31")) do
if v.mainsnak.snaktype == "value" then
local id = v.mainsnak.datavalue.value.id
if id == idGroupOfHumans then
group = true
break
end
local status, r = pcall(mw.wikibase.getReferencedEntityId, id, 'P279', { idGroupOfHumans })
if not status then
-- za dużo wywołań, max 3
break
end
if r then
group = true
break
end
end
end
return "KA test test KA"
end
}