diff options
author | Steven Barth <steven@midlink.org> | 2008-03-17 21:38:03 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-03-17 21:38:03 +0000 |
commit | f41539e5493dc8ba3059730f77a6fbb7595aae5a (patch) | |
tree | ad97b3bdd8739cf19699b9bfc8d28b8a7e403541 /src/ffluci/dispatcher.lua | |
parent | cfe8fc894fb2e51885b7a992ea685c71baf6b769 (diff) |
* Added ffluci.util.instanceof function
* Minor beautifying in dispatcher
* Added field for additional Tags under <head> in main style
* Added structure for CBI
* Added CBI to Makefile
Diffstat (limited to 'src/ffluci/dispatcher.lua')
-rw-r--r-- | src/ffluci/dispatcher.lua | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/ffluci/dispatcher.lua b/src/ffluci/dispatcher.lua index bf2ac511e4..d2998aa493 100644 --- a/src/ffluci/dispatcher.lua +++ b/src/ffluci/dispatcher.lua @@ -104,13 +104,9 @@ end function error404(message) message = message or "Not Found" - local s, t = pcall(ffluci.template.Template, "error404") - - if not s then + if not pcall(ffluci.template.render, "error404") then ffluci.http.textheader() print(message) - else - t:render() end return false end @@ -119,13 +115,9 @@ end function error500(message) ffluci.http.status(500, "Internal Server Error") - local s, t = pcall(ffluci.template.Template, "error500") - - if not s then + if not pcall(ffluci.template.render, "error500") then ffluci.http.textheader() print(message) - else - t:render() end return false end @@ -155,12 +147,8 @@ function simpleview(request) local disp = require("ffluci.dispatcher") i18n.loadc(request.module) - local s, t = pcall(tmpl.Template, request.module .. "/" .. request.action) - - if not s then + if not pcall(tmpl.render, request.module .. "/" .. request.action) then disp.error404() - else - t:render() end end |