"ഘടകം:Self" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം
(ചെ.) ഒരു പതിപ്പ് ഇറക്കുമതി ചെയ്തു |
fix wikidata get value |
||
| വരി 139: | വരി 139: | ||
if namespace==6 then | if namespace==6 then | ||
table.insert(cats, '[[Category:Self-published work]]') | table.insert(cats, '[[Category:Self-published work]]') | ||
local entity = mw.wikibase.getEntity() | -- local entity = mw.wikibase.getEntity() | ||
-- check if SDC statement exist | -- check if SDC statement exist | ||
if not(entity and entity.statements and entity.statements['P275']) then | -- if not(entity and entity.statements and entity.statements['P275']) then | ||
table.insert(cats, '[[Category:Self-published work missing SDC copyright license]]') | table.insert(cats, '[[Category:Self-published work missing SDC copyright license]]') | ||
end | -- end | ||
results = results .. table.concat(cats) -- add categories only to files | results = results .. table.concat(cats) -- add categories only to files | ||
end | end | ||