Changes

Module:Documentation

125 bytes removed, 20:18, 27 December 2013
don't use mw.uri.encode - title:fullUrl already encodes the strings for us
lspan.wikitext(mw.ustring.format(text, viewLink, editLink, historyLink, purgeLink))
else
if not preload then preload = mw.uri.encode(preload) elseif if subjectSpace == 6 then -- File namespace preload = 'Template:Documentation/preload-filespace' else preload = 'Template:Documentation/preload' end
end
lspan.wikitext(makeUrlLink(docTitle:fullUrl{action = 'edit', preload = preload}, 'create'))
local sandboxLink = makeWikilink(sandbox, 'sandbox')
local sandboxEditLink = makeUrlLink(sandboxTitle:fullUrl{action = 'edit'}, 'edit')
local compareLink = makeUrlLink(mw.title.new('Special:ComparePages'):fullUrl{page1 = mw.uri.encode(templatePage), page2 = mw.uri.encode(sandbox)}, 'diff')
text = text .. sandboxLink .. ' <small style="font-style: normal">(' .. sandboxEditLink .. ' | ' .. compareLink .. ')</small>'
else
local sandboxPreload = 'Template:Documentation/preload-' .. (subjectSpace == 828 and 'module-' or '') .. 'sandbox'
local sandboxCreateLink = makeUrlLink(sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}, 'create')
local mirrorPreload = mw.uri.encode(templatePage) local mirrorSummary = mw.uri.encode('Create sandbox version of ' .. makeWikilink(templatePage)) local mirrorLink = makeUrlLink(sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreloadtemplatePage, summary = mirrorSummary}, 'mirror')
text = text .. 'sandbox <small style="font-style: normal">(' .. sandboxCreateLink .. ' | ' .. mirrorLink .. ')</small>'
end
Anonymous user