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 32:
Zeile 32:
+
+
− +
Zeile 171:
Zeile 173:
+
+
− +
Zeile 226:
Zeile 230:
+
Zeile 234:
Zeile 239:
− +
− +
− elseif s == "string" then +
− +
+
+
+
+
+
Zeile 372:
Zeile 382:
− local shortcut
Zeile 436:
Zeile 445:
+
+
+
+
+
+
− +
Zeile 454:
Zeile 469:
+
+
+
Zeile 471:
Zeile 489:
− -- mw.text.trim()
Zeile 482:
Zeile 499:
− +
Zeile 548:
Zeile 565:
+
Zeile 556:
Zeile 574:
− +
+
+
+
+
+
− +
Zeile 568:
Zeile 591:
+
+
+
Zeile 712:
Zeile 738:
+
+
+
Zeile 740:
Zeile 769:
− +
Zeile 753:
Zeile 782:
− local s
Zeile 775:
Zeile 803:
− +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2015-03-26
--[=[ 2015-03-25
--[=[ 2015-03-26
{{Template:Phab}}
{{Template:Phab}}
]=]
]=]
-- Precondition:
-- Precondition:
-- args -- table; assignments
-- args -- table; assignments
-- .File
-- .Show
-- Postcondition:
-- Postcondition:
-- 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.File
local j = r:find( ",", 1, true )
local j = r:find( ",", 1, true )
local n, params, show
local n, params, show
-- Precondition:
-- Precondition:
-- args -- table; assignments
-- args -- table; assignments
-- .Mock
-- .Show
-- Postcondition:
-- Postcondition:
-- 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.Mock
local n = r:match( "^[Mm]?([0-9]+)$" )
local n = r:match( "^[Mm]?([0-9]+)$" )
local show
local show
-- args -- table; assignments
-- args -- table; assignments
-- .Engage
-- .Engage
-- .Show
-- string; single ID
-- string; single ID
-- Postcondition:
-- Postcondition:
if type( args.Engage ) == "string" then
if type( args.Engage ) == "string" then
tags = args.Engage
tags = args.Engage
if args.title and ( args.title ~= "" ) then
if args.Show and ( args.Show ~= "" ) then
show = args.title
show = args.Show
end
end
end
end
else
tags = args
if s == "string" then
tags = args
end
if not tags or tags == "" then
tags = "MediaWiki-General-or-Unknown"
end
end
end
if tags then
if tags then
local r, shortcut
local r, shortcut
if translate then
if translate then
if assembly:match( "^%u%u%u?%u?$" ) then
if assembly:match( "^%u%u%u?%u?$" ) then
shortcut = assembly
shortcut = assembly
-- args -- table; assignments
-- args -- table; assignments
-- .User
-- .User
-- .Show
-- frame -- object or nil
-- frame -- object or nil
-- Postcondition:
-- Postcondition:
-- Returns string URL, if fine
-- Returns string URL, if fine
-- Uses:
-- mw.text.trim()
local r
local r
local single = args.User
local single = args.User
if type( single ) == "string" then
single = mw.text.trim( single )
end
if type( single ) == "string" and single ~= "" then
if type( single ) == "string" and single ~= "" then
local show = args.title
local show = args.Show
if not show or show == "" then
if not show or show == "" then
show = "@" .. single
show = "@" .. single
single ),
single ),
show )
show )
else
r = string.format( "Missing User :-(" )
error( r, 0 )
end
end
return r
return r
-- lonely()
-- lonely()
-- id40()
-- id40()
-- phabDiffusion()
-- phabDiffusion()
-- git()
-- git()
local source = false
local source = false
local swift = "dir"
local swift = "dir"
local load, r
local lapsus, load, r
r = lonely( args,
r = lonely( args,
{ "branch", "commit", "commitdiff", "diff" } )
{ "branch", "commit", "commitdiff", "diff" } )
if show then
if show then
show = "r" .. show
show = "r" .. show
lapsus = ( not args.project )
else
else
show = "GIT:"
show = "GIT:"
end
end
if not r then
if not r then
r = git( swift, scope, slot, source, jump, since )
r = git( swift, scope, slot, source, jump, since )
lapsus = true
end
r = string.format( "[%s %s]", r, show )
if lapsus then
r = r
.. "[[Category:Wikipedia:Vorlagenfehler/Vorlage:Phab/Diffusion]]"
.. "[[Category:Wikipedia:Vorlagenfehler/Vorlage:Phab/Diffusion]]"
end
end
return string.format( "[%s %s]", r, show )
return r
end -- sourcing()
end -- sourcing()
-- Precondition:
-- Precondition:
-- args -- table; assignments
-- args -- table; assignments
-- .Task
-- .Anchor
-- .Show
-- Postcondition:
-- Postcondition:
-- Returns string with bracketed external link, if fine
-- Returns string with bracketed external link, if fine
-- unified()
-- unified()
-- sourcing()
-- sourcing()
local defaults = { Bugzilla = "",
Engage = true,
User = true }
local got = { }
local got = { }
local mode = 0
local mode = 0
title = 2,
title = 2,
callsigns = 3 }
callsigns = 3 }
local gr
local gr, s
for k, v in pairs( args ) do
for k, v in pairs( args ) do
mode = params[ k ]
mode = params[ k ]
r = got[ -1 ]
r = got[ -1 ]
if r then
if r then
if #r == 1 then
if #r == 1 then
s = ""
s = ""
got = got[ mode ]
got = got[ mode ]
for k, v in pairs( got ) do
for k, v in pairs( got ) do
if v and #v == 0 then
s = type( v )
if s == "number" then
v = tostring( v )
elseif s == "string" then
if #v == 0 then
v = defaults[ k ]
end
elseif v == true then
v = defaults[ k ]
else
v = nil
end
if v then
got[ k ] = v
else
got[ k ] = nil
got[ k ] = nil
end
end