-%>
<%
- local fs = require "luci.fs"
+ local fs = require "nixio.fs"
local sys = require "luci.sys"
local util = require "luci.util"
local http = require "luci.http"
local banner = false
local show_comm = true
- local lo = fs.glob("/www/luci-static/resources/custom_logo.*")
- if lo[1] then
- logo = string.gsub(lo[1], "/www", "")
+ local file
+ for file in fs.glob("/www/luci-static/resources/custom_logo.*") do
+ logo = string.gsub(file, "/www", "")
+ break
end
- local lon = fs.glob("/www/luci-static/resources/custom_logo_only.*")
- if lon[1] then
- logo = string.gsub(lon[1], "/www", "")
+ for file in fs.glob("/www/luci-static/resources/custom_logo_only.*") do
+ logo = string.gsub(file, "/www", "")
show_comm = false
+ break
end
- local hea = fs.glob("/www/luci-static/resources/custom_header.*")
- if hea[1] then
- logo = string.gsub(hea[1], "/www", "")
+ for file in fs.glob("/www/luci-static/resources/custom_header.*") do
+ logo = string.gsub(file, "/www", "")
show_comm = false
banner = true
end