Module:Transclusion count: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(make local)
m (move comment)
Line 9: Line 9:
local data = mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))
local data = mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))
-- If database value doesn't exist, use value passed to template
local return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")])
local return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")])
-- If database value doesn't exist, use value passed to template
if return_value == nil then
if return_value == nil then
local arg1=mw.ustring.match(frame.args[1], '[%d,]+')
local arg1=mw.ustring.match(frame.args[1], '[%d,]+')