Anonymous user
Module:Protection banner: Difference between revisions
make makeFullUrl a local helper function
Enwikipedia>Mr. Stradivarius (specify Template:Pp as a wrapper for the module, and make args a local variable as otherwise it's a bit of a bracket overload) |
Enwikipedia>Jackmcbarn (make makeFullUrl a local helper function) |
||
Line 43:
tostring(dateString)
))
end▼
return string.format(▼
'[%s %s]',▼
tostring(mw.uri.fullUrl(page, query)),▼
display▼
)▼
end
Line 319 ⟶ 327:
-- Static methods --
▲function Blurb.makeFullUrl(page, query, display)
▲ return string.format(
▲ '[%s %s]',
▲ tostring(mw.uri.fullUrl(page, query)),
▲ display
▲ )
▲end
function Blurb.formatDate(num)
Line 396:
if self._protectionObj.action == 'move' then
-- We need the move log link.
return
'Special:Log',
{type = 'move', page = pagename},
Line 403:
else
-- We need the history link.
return
pagename,
{action = 'history'},
Line 598:
if self._protectionObj.action == 'autoreview' then
-- We need the pending changes log.
return
'Special:Log',
{type = 'stable', page = pagename},
Line 605:
else
-- We need the protection log.
return
'Special:Log',
{type = 'protect', page = pagename},
|