Modulo:Webarchive/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
fix |
riscrivo decodeWebciteDate |
||
Riga 56:
track["Categoria:Errori di compilazione del template Webarchive"] = 1
return '<span style="font-size:100%" class="error citation-comment">Errore nella compilazione del template
end
Riga 192:
--[[--------------------------< decodeWebciteDate >-----------------------
]]
▲ dt.split = mw.text.split(path, "/")
-- http://www.webcitation.org/1138911916587475
▲ -- valid URL formats that are not base62
▲ -- http://www.webcitation.org/query?url=http..&date=2012-06-01+21:40:03
▲ -- http://www.webcitation.org/1138911916587475
▲ -- http://www.webcitation.org/cache/73e53dd1f16cf8c5da298418d2a6e452870cf50e
if mw.ustring.find( dt.split[2], "query") or▼
mw.ustring.find( dt.split[2], "cache") or▼
mw.ustring.find( dt.split[2], "getfile") or▼
tonumber(dt.split[2]) then▼
return "query"▼
end▼
dt.full = os.date("%Y %m %d", string.sub(string.format("%d", base62(dt.split[2])),1,10) )▼
dt.split = mw.text.split(dt.full, " ")▼
return inlineRed("[Errore nella data] (1)", "error")▼
local fulldate = makeDate(dt.year, dt.month, dt.day, df)▼
▲
end
Line 485 ⟶ 460:
if url1 == "https://web.archive.org/http:/" then -- track bug
track["Categoria:Errori di compilazione del template Webarchive"] = 1
return inlineError("url", "
end
Line 509 ⟶ 484:
local ldf = dateFormat(date)
if ldf then
local udate = p.decodeWebciteDate( uri1.path, ldf )
if udate == "query" then -- skip
elseif udate ~= date then
Line 517 ⟶ 492:
elseif not date and url_main.service == "wayback" then
date = p.decodeWaybackDate( uri1.path, "iso" )
elseif not date and url_main.service == "webcite" then
date = p.decodeWebciteDate( uri1.path, "iso" )
if date == "query" then
date = inlineRed("[Data mancante]", "warning")
|