Module:Gutenberg: Difference between revisions

Content deleted Content added
Use HTTPS for FadedPage links (from what it appears, the FadedPage book and author links will generate an HTTP 301 redirect to an HTTPS version of the URL when accessed with HTTP.)
Line 19:
id = trimArg(args[1]) or trimArg(args.id)
if not id then
local bestP1938 = mw.wikibase.getBestStatements(mw.wikibase.getEntityIdForCurrentPage(), 'P1938')[1]
error("Parameter id is missing. See [[Template:" .. tname .. "]] documentation")
if bestP1938 and bestP1938.mainsnak.snaktype == 'value' then
else
id = bestP1938.mainsnak.datavalue.value
if tonumber(id) then -- it's a number
urlhead = urlheadnumb
else
error("Parameter id is missing. See [[Template:" .. tname .. "]] documentation")
urlhead = urlheadname
id = mw.ustring.gsub(id," ", "+")
end
end
if tonumber(id) then -- it's a number
urlhead = urlheadnumb
else
urlhead = urlheadname
id = mw.ustring.gsub(id," ", "+")
end
 
-- Argument |name=