Changes
sync doi() from sandbox to fix minor error because same time fixed lua script error in ~/Date validation;
local url_string = options.id;
local ext_link;
local this_wiki_code = cfg.this_wiki_code; -- wikipedia subdomain; 'en' for en.wikipedia.org
local wd_article; -- article title from wikidata
end
if string.match (mw.site.server, 'wikidata') then
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=access}) .. (inactive or '')
end
if isbn_str:match( "^97[89]%d*$" ) == nil then
return false, 'invalid prefix'; -- fail when isbn13 does not begin with 978 or 979
end
if isbn_str:match ('^9790') then
return false, 'invalid group id'; -- group identifier '0' is reserved to ismn
end
return is_valid_isxn_13 (isbn_str), 'checksum';
function as they are directly rendered as free without using an additional parameter.
access-level values must match the case used in cfg.keywordskeywords_lists['id-access'] (lowercase unless there is some special reason for something else)
]]
local access_level = args[access_param]; -- get the assigned value if there is one
if is_set (access_level) then
if not in_array (access_level, cfg.keywordskeywords_lists['id-access']) then -- exact match required
table.insert( z.message_tail, { set_error( 'invalid_param_val', {access_param, access_level}, true ) } );
access_level = nil; -- invalid so unset
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
id_accesses_list[k] = cfg.keywords_xlate[access_level]; -- get translated keyword
end
end