Modulo:Software: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m raw licenses
m disabling cache
Riga 213:
local licenseIsFree_ = {}
function p._licenseIsFree(license)
return mWikidata._instanceOf({'Q3943414'}, {from = license})
if licenseIsFree_[license] == nil then
-- TODO cache does not work?
 
--if licenseIsFree_[license] == nil then
-- Q3943414 free software license
-- licenseIsFree_[license] = mWikidata._instanceOf({'Q3943414'}, {from = license}) or false
--end
--return licenseIsFree_[license]
end
 
Riga 234 ⟶ 237:
]]
function p._hasAFreeLicense(frame)
for _, licensel in pairs( p._licenses(frame) ) do
licensel = mWikidata._formatStatement(licensel, {formatting = 'raw'})
if p._licenseIsFree(licensel) then
return true
end
Riga 247 ⟶ 250:
]]
function p._hasAProprietaryLicense(frame)
for _, licensel in pairs( p._licenses(frame) ) do
licensel = mWikidata._formatStatement(licensel, {formatting = 'raw'})
if p._licenseIsProprietary(licensel) then
return true
end