Commit 04503eb3 authored by Ted Trask's avatar Ted Trask
Browse files

Fix http(s) getlogcandidates to work with acf-alpine-baselayout-0.12.0

parent 74097acf
......@@ -638,9 +638,18 @@ local getlogcandidates = function(source, cookiesfile)
local candidates = {}
if source.method == "http" or source.method == "https" then
local resultpage = modelfunctions.run_executable({"wget", "-O", "-", "--no-check-certificate", "--load-cookies", cookiesfile, source.method.."://"..source.source.."/cgi-bin/acf/alpine-baselayout/logfiles/status"})
-- This method works for view prior to acf-alpine-baselayout-0.12.0
for file in string.gmatch(resultpage, "download%?[^\"]*name=([^\"]+)") do
candidates[#candidates+1] = file
-- This method works for view from acf-alpine-baselayout-0.12.0
local reversetable = {}
for file in string.gmatch(resultpage, 'name="filename" value="([^\"]+)"') do
if not reversetable[file] then
candidates[#candidates+1] = file
reversetable[file] = true
elseif source.method == "local" then
candidates = fs.find_files_as_array(nil, source.source)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment