Changes

Jump to navigation Jump to search
fix source check for compatibility status
Line 49: Line 49:  
   local betaUnofficialVersion = private.emptyToNil(frame.args["beta unofficial version"])
 
   local betaUnofficialVersion = private.emptyToNil(frame.args["beta unofficial version"])
 
   local betaUnofficialUrl    = private.emptyToNil(frame.args["beta unofficial url"])
 
   local betaUnofficialUrl    = private.emptyToNil(frame.args["beta unofficial url"])
 +
 +
  -- get source url
 +
  local sourceUrl = customSource
 +
  if github then
 +
    sourceUrl = "https://github.com/" .. string.gsub(mw.uri.encode(github, "PATH"), "%%2F", "/")
 +
  end
 +
  local hasSource = sourceUrl ~= nil
    
   -- parse compatibility
 
   -- parse compatibility
   local compat = private.getCompatInfo(status, summary, brokeIn, unofficialVersion, unofficialUrl)
+
   local compat = private.getCompatInfo(status, summary, brokeIn, unofficialVersion, unofficialUrl, hasSource)
 
   local betaCompat = nil
 
   local betaCompat = nil
 
   if betaStatus or betaBrokeIn or betaUnofficialUrl or betaUnofficialVersion then
 
   if betaStatus or betaBrokeIn or betaUnofficialUrl or betaUnofficialVersion then
     betaCompat = private.getCompatInfo(betaStatus, betaSummary, betaBrokeIn, betaUnofficialVersion, betaUnofficialUrl)
+
     betaCompat = private.getCompatInfo(betaStatus, betaSummary, betaBrokeIn, betaUnofficialVersion, betaUnofficialUrl, hasSource)
 
   end
 
   end
   Line 65: Line 72:  
   else
 
   else
 
     url = customUrl
 
     url = customUrl
  end
  −
  −
  -- get source url
  −
  local sourceUrl = customSource
  −
  if github then
  −
    sourceUrl = "https://github.com/" .. string.gsub(mw.uri.encode(github, "PATH"), "%%2F", "/")
   
   end
 
   end
  
translators
8,404

edits

Navigation menu