Module:Citation/CS1: Difference between revisions

fix inactive doi
m>Dragons flight
(plural option for editors)
m>Dragons flight
(fix inactive doi)
Line 53: Line 53:
end
end


function doi(frame, id, broken, inactive, nocat)
function doi(frame, id, inactive, nocat)
    local text = externallinkid(frame, {link="Digital object identifier",label="doi",prefix="http://dx.doi.org/",id=id,separator=":"})
     local cat = ""
     local cat = ""
    local text;
     if ( inactive ~= nil ) then  
     if ( inactive ~= nil ) then  
        text = "[[Digital object identifier|doi]]:" .. id;
         inactive = " (inactive " .. inactive .. ")"  
         inactive = " (inactive " .. inactive .. ")"  
         cat = cat .. "[[Category:Pages with DOIs inactive since " .. z.wikitext.canonicalcleanuptime(inactive) .. "]]"
         cat = cat .. "[[Category:Pages with DOIs inactive since " .. z.wikitext.canonicalcleanuptime(inactive) .. "]]"
     else  
     else  
        text = externallinkid(frame, {link="Digital object identifier",label="doi",prefix="http://dx.doi.org/",id=id,separator=":"})
         inactive = ""  
         inactive = ""  
     end
     end
Anonymous user