Nicht angemeldeter Benutzer - Bearbeiten von Seiten ist nur als angemeldeter Benutzer möglich.

Änderungen

Zur Navigation springen Zur Suche springen
792 Bytes hinzugefügt ,  00:42, 18. Jul. 2018
2018-07-15
Zeile 1: Zeile 1: −
local Serial = "2016-04-29"
+
local Serial = "2018-07-15"
 
--[=[
 
--[=[
 
{{Template:Phab}}
 
{{Template:Phab}}
Zeile 386: Zeile 386:     
local function phabDiffusion( action, assembly, adopt, attach,
 
local function phabDiffusion( action, assembly, adopt, attach,
                               anchor, against, frame )
+
                               anchor, against, as, frame )
 
     -- Create path for Phabricator Diffusion since 2015-03
 
     -- Create path for Phabricator Diffusion since 2015-03
 
     -- Precondition:
 
     -- Precondition:
Zeile 395: Zeile 395:  
     --    anchor    -- string; line number (or empty)
 
     --    anchor    -- string; line number (or empty)
 
     --    against  -- string; diff ./. previous ID (or empty)
 
     --    against  -- string; diff ./. previous ID (or empty)
 +
    --    as        -- string; s  = query
 
     --    frame    -- object or nil
 
     --    frame    -- object or nil
 
     -- Postcondition:
 
     -- Postcondition:
Zeile 471: Zeile 472:  
                         sub = string.format( "%s$%s", sub, anchor )
 
                         sub = string.format( "%s$%s", sub, anchor )
 
                     end
 
                     end
 +
                end
 +
                if as then
 +
                    sub = string.format( "%s?%s", sub, as )
 
                 end
 
                 end
 
             end
 
             end
Zeile 538: Zeile 542:  
     local jump  = false
 
     local jump  = false
 
     local last  = false
 
     local last  = false
 +
    local query  = false
 
     local scope  = "mediawiki/core"
 
     local scope  = "mediawiki/core"
 
     local show
 
     local show
Zeile 554: Zeile 559:  
         swift  = r
 
         swift  = r
 
         source = args[ swift ]
 
         source = args[ swift ]
 +
        if args.file then
 +
            local suffix = args.file:match( "%.(%l+)$" )
 +
            if suffix then
 +
                if suffix == "svg" then
 +
                    query = "as=source&highlight=xml&"
 +
                elseif suffix == "json" or
 +
                      suffix == "txt" or
 +
                      suffix == "xml" then
 +
                    query = "?"
 +
                end
 +
                if query then
 +
                    query = query .. "blame=off"
 +
                end
 +
                if suffix == "md" then
 +
                    query = "as=remarkup"
 +
                end
 +
            end
 +
        end
 
     end
 
     end
 
     r = lonely( args,  { "commit", "commitdiff" } )
 
     r = lonely( args,  { "commit", "commitdiff" } )
Zeile 579: Zeile 602:  
             end
 
             end
 
             error( r, 0 )
 
             error( r, 0 )
         end
+
         elseif args.line then
        if args.line then
   
             if args.diff then
 
             if args.diff then
 
                 r = "No ''line'' on ''diff'' page available"
 
                 r = "No ''line'' on ''diff'' page available"
Zeile 612: Zeile 634:  
     end
 
     end
 
     r, show = phabDiffusion( swift, scope, slot, source, jump, since,
 
     r, show = phabDiffusion( swift, scope, slot, source, jump, since,
                             frame )
+
                             query, frame )
 
     if args.title and ( args.title ~= "" ) then
 
     if args.title and ( args.title ~= "" ) then
 
         show = args.title
 
         show = args.title
Cookies helfen uns bei der Bereitstellung von imedwiki. Durch die Nutzung von imedwiki erklärst du dich damit einverstanden, dass wir Cookies speichern.

Navigationsmenü