Module:Copied/sandbox: Difference between revisions

Content deleted Content added
bug fix
You should assume prev not current
Line 7:
local from_oldid = args["from_oldid"] or args["from_oldid1"] or ""
local from = args["from"] or args["from1"] or ""
local to_diff = args["to_diff"] or args["to_diff1"] or ""
local diff = args["diff"] or args["diff1"] or ""
local to_oldid = args["to_oldid"] or args["to_oldid1"] or ""
local to = args["to"] or args["to1"] or ""
local date = args["date"] or args["date1"] or ""
Line 29 ⟶ 26:
text = string.format("%s [[%s]]",text,to)
end
iflocal not (diff == args["diff")] thenor args["diff1"]
local to_diff = args["to_diff"] or args["to_diff1"] or ""
local diffto_oldid = args["diffto_oldid"] or args["diff1to_oldid1"] or ""
if (diff) then
text = string.format("%s with [%s this edit]",text,diff)
elseif not (to_oldid == "") or not (to_diff == "") then
text = string.format("%s with [%s this edit]",text,tostring(mw.uri.fullUrl(to, {diff=to_diff or "prev", oldid = to_oldid or ""} )))
end
if not (date == "") then
Line 75:
text = string.format("%s ([%s diff])",text,diff)
elseif (to_oldid or to_diff) then
text = string.format("%s ([%s diff])",text,tostring(mw.uri.fullUrl(to, {diff=to_diff or "prev", oldid = to_oldid or ""} )))
end
local date = args["date" .. i]