libs/web: restore protected call to Template(), was accidentally removed in r4889
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 7 Aug 2009 15:16:14 +0000 (15:16 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 7 Aug 2009 15:16:14 +0000 (15:16 +0000)
libs/web/luasrc/dispatcher.lua

index a375eec..6d44339 100644 (file)
@@ -219,8 +219,7 @@ function dispatch(request)
        if (c and c.index) or not track.notemplate then
                local tpl = require("luci.template")
                local media = track.mediaurlbase or luci.config.main.mediaurlbase
-               if not tpl.Template("themes/%s/header" % fs.basename(media)) then 
-               --if not pcall(tpl.Template, "themes/%s/header" % fs.basename(media)) then
+               if not pcall(tpl.Template, "themes/%s/header" % fs.basename(media)) then
                        media = nil
                        for name, theme in pairs(luci.config.themes) do
                                if name:sub(1,1) ~= "." and pcall(tpl.Template,