Module:Solar eclipse: Difference between revisions

Content deleted Content added
temporary code until the remaining db pages are migrated
simplify
Line 2:
local args = {}
 
local data_module_prefix = "Module:Solar eclipse/datadb/"
local data_module_prefix2 = "Module:Solar eclipse/db/"
 
local function ifnotempty(s,a,b)
Line 44 ⟶ 43:
if( yearstr ~= '' ) then
local dbsubpage = math.floor( (tonumber(yearstr) - 1) / 50 ) * 5
local dbpage = ifexist(data_module_prefix .. tostring( dbsubpage )) and data_module_prefix .. tostring( dbsubpage ) or data_module_prefix2 .. tostring( dbsubpage )
if (mw.title.newifexist(dbpage)) then
local data = mw.loadData(dbpage)
local dargs = data[s]