luci-theme-freifunk-generic: switch to nixio.fs
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
831a8cb13d
commit
921df0f3fc
1 changed files with 10 additions and 10 deletions
|
@ -11,7 +11,7 @@ You may obtain a copy of the License at
|
||||||
-%>
|
-%>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
local fs = require "luci.fs"
|
local fs = require "nixio.fs"
|
||||||
local sys = require "luci.sys"
|
local sys = require "luci.sys"
|
||||||
local util = require "luci.util"
|
local util = require "luci.util"
|
||||||
local http = require "luci.http"
|
local http = require "luci.http"
|
||||||
|
@ -50,20 +50,20 @@ You may obtain a copy of the License at
|
||||||
local banner = false
|
local banner = false
|
||||||
local show_comm = true
|
local show_comm = true
|
||||||
|
|
||||||
local lo = fs.glob("/www/luci-static/resources/custom_logo.*")
|
local file
|
||||||
if lo[1] then
|
for file in fs.glob("/www/luci-static/resources/custom_logo.*") do
|
||||||
logo = string.gsub(lo[1], "/www", "")
|
logo = string.gsub(file, "/www", "")
|
||||||
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
local lon = fs.glob("/www/luci-static/resources/custom_logo_only.*")
|
for file in fs.glob("/www/luci-static/resources/custom_logo_only.*") do
|
||||||
if lon[1] then
|
logo = string.gsub(file, "/www", "")
|
||||||
logo = string.gsub(lon[1], "/www", "")
|
|
||||||
show_comm = false
|
show_comm = false
|
||||||
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
local hea = fs.glob("/www/luci-static/resources/custom_header.*")
|
for file in fs.glob("/www/luci-static/resources/custom_header.*") do
|
||||||
if hea[1] then
|
logo = string.gsub(file, "/www", "")
|
||||||
logo = string.gsub(hea[1], "/www", "")
|
|
||||||
show_comm = false
|
show_comm = false
|
||||||
banner = true
|
banner = true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue