Difference between revisions of Module:Citation/CS1/Identifiers/sandbox

NottNott (talk | contribs)
m 1 revision imported
Viceroy Sam (talk | contribs)
m top: Typo fixing, typos fixed: wikipedia → Wikipedia (2), identifer → identifier
 
Line 39: Line 39:


local wd_article;
local wd_article;
local this_wiki_code = cfg.this_wiki_code; -- wikipedia subdomain; 'en' for en.wikipedia.org
local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org


wd_article = mw.wikibase.getSitelink (q, this_wiki_code .. 'wiki'); -- fetch article title from wd; nil when no title available at this wiki
wd_article = mw.wikibase.getSitelink (q, this_wiki_code .. 'wiki'); -- fetch article title from wd; nil when no title available at this wiki
Line 60: Line 60:
local url_string = options.id;
local url_string = options.id;
local ext_link;
local ext_link;
local this_wiki_code = cfg.this_wiki_code; -- wikipedia subdomain; 'en' for en.wikipedia.org
local this_wiki_code = cfg.this_wiki_code; -- Wikipedia subdomain; 'en' for en.wikipedia.org
local wd_article; -- article title from wikidata
local wd_article; -- article title from wikidata
Line 1,373: Line 1,373:
access_level = nil; -- invalid so unset
access_level = nil; -- invalid so unset
end
end
if not is_set(id_list[k]) then -- identifer access-level must have a matching identifier
if not is_set(id_list[k]) then -- identifier access-level must have a matching identifier
table.insert( z.message_tail, { set_error( 'param_access_requires_param', {k:lower()}, true ) } ); -- param name is uppercase in cfg.id_handlers (k); lowercase for error message
table.insert( z.message_tail, { set_error( 'param_access_requires_param', {k:lower()}, true ) } ); -- param name is uppercase in cfg.id_handlers (k); lowercase for error message
end
end