diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-15 15:09:02 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-15 15:09:02 +0100 |
commit | 921df0f3fc47720f280c5b758154d69acabb87d1 (patch) | |
tree | 0b33b0e3b039258b049f5ed9eaf003e714cabf2e /themes/luci-theme-freifunk-generic/luasrc | |
parent | 831a8cb13de8969518c3c541c319626012649e91 (diff) |
luci-theme-freifunk-generic: switch to nixio.fs
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'themes/luci-theme-freifunk-generic/luasrc')
-rw-r--r-- | themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm index 3eacf0a1e..20058be6c 100644 --- a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm +++ b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm @@ -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 util = require "luci.util" local http = require "luci.http" @@ -50,20 +50,20 @@ You may obtain a copy of the License at 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 |