Modulis:IsCommons
Lua kļūda Modulis:Documentation, 144. rinda: message: type error in message cfg.container (string expected, got nil).
local p = {}
local getArgs = require('Module:Arguments').getArgs
function p._main(args)
local file = args[1]
local title = mw.title.new( file, 'Attēls' )
local localfile = args.localfile
local commonsfile = args.commonsfile
if title.exists then
result = localfile
else
result = commonsfile
end
return result
end
function p.main(frame)
local args = getArgs(frame)
return p._main(args)
end
return p