Nicht angemeldeter Benutzer - Bearbeiten von Seiten ist nur als angemeldeter Benutzer möglich.
Änderungen
Zur Navigation springen
Zur Suche springen
Zeile 1:
Zeile 1:
− +
Zeile 40:
Zeile 40:
− +
Zeile 55:
Zeile 55:
− r = string.format( "%sF%d", Site, n )
− show = args.Show +
− show = string.format( "phab:F%d", n ) +
− r = string.format( "[%s %s]", r, show )
Zeile 181:
Zeile 179:
− local show
Zeile 188:
Zeile 185:
− r = string.format( "%sM%d", Site, n )
− show = args.Show +
− show = string.format( "phab:M%d", n ) +
− r = string.format( "[%s %s]", r, show )
Zeile 265:
Zeile 260:
− +
− +
Zeile 286:
Zeile 281:
− +
Zeile 319:
Zeile 314:
− +
− +
Zeile 355:
Zeile 350:
− +
+
Zeile 364:
Zeile 360:
− +
Zeile 431:
Zeile 427:
− +
Zeile 463:
Zeile 459:
− +
− Site,
Zeile 571:
Zeile 566:
− +
+
+
− +
+
− r = string.format( "[%s %s]", r, show )
Zeile 598:
Zeile 595:
− +
− +
+
Zeile 605:
Zeile 603:
− +
− args.Anchor = scroll +
Zeile 616:
Zeile 614:
− r = string.format( "%sT%d", Site, n )+
− +
− r = string.format( "%s#anchor-%s", r, args.Anchor ) +
+
Zeile 624:
Zeile 623:
− +
− +
− +
2015-03-30
--[=[ 2015-03-28
--[=[ 2015-03-30
{{Template:Phab}}
{{Template:Phab}}
]=]
]=]
local r = args.File
local r = args.File
local j = r:find( ",", 1, true )
local j = r:find( ",", 1, true )
local n, params, show
local n, params
if j then
if j then
params = r:sub( j + 1 )
params = r:sub( j + 1 )
error( r, 0 )
error( r, 0 )
end
end
if args.Show then
if args.Show then
r = string.format( "[[phab:F%d|%s]]", n, args.Show )
else
else
r = string.format( "[[phab:F%d]]", n )
end
end
return r
return r
end -- file()
end -- file()
local r = args.Mock
local r = args.Mock
local n = r:match( "^[Mm]?([0-9]+)$" )
local n = r:match( "^[Mm]?([0-9]+)$" )
if n then
if n then
n = tonumber( n ) -- discard leading zeros
n = tonumber( n ) -- discard leading zeros
error( r, 0 )
error( r, 0 )
end
end
if args.Show then
if args.Show then
r = string.format( "[[phab:M%d|%s]]", n, args.Show )
else
else
r = string.format( "[[phab:M%d]]", n )
end
end
return r
return r
end -- mock()
end -- mock()
show = "#" .. s
show = "#" .. s
end
end
r = string.format( "%s[%stag/%s %s]",
r = string.format( "%s[[phab:tag/%s|%s]]",
r, Site, s:lower(), show )
r, s:lower(), show )
end -- for i
end -- for i
return r
return r
local callsigns = { }
local callsigns = { }
local order = { }
local order = { }
local sub = "diffusion/"
local sub = "phab:diffusion/"
local details, pages, s, sign, support
local details, pages, s, sign, support
r = "{| class='wikitable sortable'\n" ..
r = "{| class='wikitable sortable'\n" ..
sign = order[ i ]
sign = order[ i ]
show = callsigns[ sign ]
show = callsigns[ sign ]
r = string.format( "%s|- id='%s'\n|[%s%s%s %s]||%s\n",
r = string.format( "%s|- id='%s'\n|[[%s%s|%s]]||%s\n",
r, sign, Site, sub, sign, sign, show )
r, sign, sub, sign, sign, show )
pages = { }
pages = { }
details = connect[ sign ]
details = connect[ sign ]
end
end
end -- for i
end -- for i
r = r .. "|}\n"
r = string.format( "%s|}\n%d ",
r, #order )
end
end
return r
return r
local function phabDiffusion( action, assembly, adopt, attach,
local function phabDiffusion( action, assembly, adopt, attach,
anchor, against, frame )
anchor, against, frame )
-- Create URL for Phabricator Diffusion since 2015-03
-- Create path for Phabricator Diffusion since 2015-03
-- Precondition:
-- Precondition:
-- action -- string; kind of request
-- action -- string; kind of request
end
end
end
end
r = Site .. sub
r = "phab:" .. sub
end
end
end
end
frame = mw.getCurrentFrame()
frame = mw.getCurrentFrame()
end
end
r = string.format( "[%sp/%s %s]",
r = string.format( "[[phab:p/%s|%s]]",
frame:callParserFunction( "urlencode",
frame:callParserFunction( "urlencode",
single ),
single ),
show = scope .. "/*"
show = scope .. "/*"
end
end
if not r then
if r then
r = string.format( "[[%s|%s]]", r, show )
else
if not scope:find( "/", 3, true ) then
if not scope:find( "/", 3, true ) then
error( "Unknown project: " .. scope, 0 )
error( "Unknown project: " .. scope, 0 )
end
end
r = git( swift, scope, slot, source, jump, since )
r = git( swift, scope, slot, source, jump, since )
r = string.format( "[%s %s]", r, show )
lapsus = true
lapsus = true
end
end
if lapsus then
if lapsus then
r = string.format( "%s[[%s/Diffusion]]",
r = string.format( "%s[[%s/Diffusion]]",
-- Returns string with bracketed external link, if fine
-- Returns string with bracketed external link, if fine
-- Throws error on failure
-- Throws error on failure
local r = args.Task
local r = args.Task
local j = r:find( "#", 1, true )
local j = r:find( "#", 1, true )
local sub = args.Anchor
local n, show
local n, show
if j then
if j then
r = r:sub( 1, j - 1 )
r = r:sub( 1, j - 1 )
scroll = scroll:match( "^([0-9]+)$" )
scroll = scroll:match( "^([0-9]+)$" )
if scroll and not args.Anchor then
if scroll and not sub then
sub = scroll
end
end
end
end
error( r, 0 )
error( r, 0 )
end
end
if sub then
if args.Anchor then
sub = string.format( "#anchor-%s", sub )
else
sub = ""
end
end
if args.Show then
if args.Show then
else
else
show = string.format( "phab:T%d", n )
show = string.format( "phab:T%d", n )
if args.Anchor then
if sub then
show = string.format( "%s #%s", show, args.Anchor )
show = string.format( "%s #%s", show, sub )
end
end
end
end
r = string.format( "[%s %s]", r, show )
r = string.format( "[[phab:T%d%s|%s]]", n, sub, show )
return r
return r
end -- task()
end -- task()