Module:FreeBSD: Difference between revisions
From Nasqueron Agora
m (Dereckson moved page Module:PrintsFreeBSDPort to Module:FreeBSD without leaving a redirect: A module is more generic than one function.) |
(freshports.org now has HTTPS support) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
-- Gets a formatted FreeBSD port link | -- Gets a formatted FreeBSD port link | ||
function p.GetsPortLink(frame) | function p.GetsPortLink(frame) | ||
if frame.args | if (frame.args.url == nil or frame.args.url == '') then | ||
link = " | link = "https://www.freshports.org/" .. frame.args.port | ||
else | else | ||
link = frame.args | link = frame.args.url | ||
end | end | ||
return '[' .. link .. ' ' .. frame.args | return '[' .. link .. ' ' .. frame.args.port .. ']' | ||
end | end | ||
return p | return p |
Latest revision as of 15:13, 13 February 2017
Documentation for this module may be created at Module:FreeBSD/doc