Module:Catégorisation badges

De Lagny-sur-Marne Wiki
Révision datée du 7 septembre 2014 à 14:54 par Orlodrim (discussion) (Résumé automatique : contenu remplacé par « local p = { } function p.hasAnyBadge( frame ) local entity = mw.wikibase.getEntityObject() for siteid, linkTable in pairs( ent... ».)
Aller à : navigation, rechercher

La documentation pour ce module peut être créée à Module:Catégorisation badges/doc

local p = { }

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

return p