Módulo:Categorización de buenos y destacados

De Hispanopedia
Revisión del 08:58 12 sep 2015 de imported>Jmvkrecords (Traduciendo desde https://fr.wikipedia.org/wiki/Module:Catégorisation_badges/Détection)

Uso


local p = { }

function p.hasAnyBadge( frame )
        local entity = mw.wikibase.getEntityObject()
        if not entity then
                return ''
        end
        for siteid, linkTable in pairs( entity.sitelinks ) do
                if next(entity.sitelinks[ siteid ].badges) ~= nil then
                        return '1'
                end
        end
        return ''
end

return p