Модуль:Citation/CS1: відмінності між версіями

[перевірена версія][перевірена версія]
Вилучено вміст Додано вміст
виправлення самозакривних тегів за запитом Avatar6 на сторінці обговорення: Обговорення модуля:Citation/CS1
виконання запиту на Обговорення шаблону:Cite web
Рядок 13:
-- Contains a list of all recognized parameters
local whitelist = mw.loadData( 'Module:Citation/CS1/Whitelist' );
local utilities = require ('Module:Citation/CS1/Utilities');
 
-- Whether variable is set or not
Рядок 788 ⟶ 789:
local TitleType = A['TitleType'];
local ArchiveURL = A['ArchiveURL'];
local URLUrlStatus = A['URLUrlStatus'];
local URL = A['URL'];
local URLorigin = A:ORIGIN('URL');
local ChapterURL = A['ChapterURL'];
Рядок 1079 ⟶ 1081:
local OriginalURL = URL
DeadURL = DeadURL:lower();
UrlStatus = UrlStatus:lower();
if is_set( ArchiveURL ) then
if ( DeadURL ~= "no" or UrlStatus ~= "live") then
URL = ArchiveURL
URLorigin = A:ORIGIN('ArchiveURL')
Рядок 1285 ⟶ 1288:
ArchiveDate = seterror('archive_missing_date');
end
if "no" == DeadURL or UrlStatus == "live" then
local arch_text = cfg.messages['archived'];
if sepc ~= "." then arch_text = arch_text:lower() end
Рядок 1294 ⟶ 1297:
end
elseif is_set(OriginalURL) then
if utilities.in_array (UrlStatus, {'unfit', 'usurped', 'bot: unknown'}) then
local arch_text = cfg.messages['archived-dead'];
arch_text = cfg.messages['archived-unfit'];
if sepc ~= "." then arch_text = arch_text:lower() end
if sepc ~= "." then arch_text = arch_text:lower() end
Archived = sepc .. " " .. substitute( arch_text,
Archived = sepc .. " " .. arch_text .. ArchiveDate; -- format already styled
{ externallink( OriginalURL, cfg.messages['original'] ), ArchiveDate } );
if 'bot: unknown' == UrlStatus then
utilities.set_error ('maint_bot_unknown'); -- and add a category if not already added
else
utilities.set_error ('maint_unfit');
end
else
local arch_text = cfg.messages['archived-dead'];
if sepc ~= "." then arch_text = arch_text:lower() end
Archived = sepc .. " " .. substitute( arch_text,
{ externallink( OriginalURL, cfg.messages['original'] ), ArchiveDate } );
end
else
local arch_text = cfg.messages['archived-missing'];