webmcp
diff framework/cgi-bin/webmcp.lua @ 2:72860d232f32
Version 1.0.2
Fixed bug with explicit garbage collection (requests > 256kB caused an error)
Views prefixed with an underscore can't be called externally
ui.paginate now displays the last page, if the selected page number is too high.
Fixed bug with explicit garbage collection (requests > 256kB caused an error)
Views prefixed with an underscore can't be called externally
ui.paginate now displays the last page, if the selected page number is too high.
author | jbe/bsw |
---|---|
date | Thu Dec 10 12:00:00 2009 +0100 (2009-12-10) |
parents | 985024b16520 |
children | 795b764629ca |
line diff
1.1 --- a/framework/cgi-bin/webmcp.lua Tue Nov 17 12:00:00 2009 +0100 1.2 +++ b/framework/cgi-bin/webmcp.lua Thu Dec 10 12:00:00 2009 +0100 1.3 @@ -1,6 +1,6 @@ 1.4 #!/usr/bin/env lua 1.5 1.6 -_WEBMCP_VERSION = "1.0.1" 1.7 +_WEBMCP_VERSION = "1.0.2" 1.8 1.9 -- include "../lib/" in search path for libraries 1.10 do 1.11 @@ -346,10 +346,14 @@ 1.12 end 1.13 1.14 if not request.get_redirect_data() then 1.15 + local view = request.get_view() 1.16 + if string.find(view, "^_") then 1.17 + error("Tried to call a private view (prefixed with underscore).") 1.18 + end 1.19 request.process_forward() 1.20 execute.filtered_view{ 1.21 module = request.get_module(), 1.22 - view = request.get_view(), 1.23 + view = view, 1.24 } 1.25 end 1.26