From 10cfd9d946f2bf5eaea11ea98bd00054431579de Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 16 Feb 2010 08:55:13 +0000 Subject: Added new view variable wwwprefix to adjust web path, fix index.html redirect. --- app/acf-util/password-status-html.lsp | 2 +- app/acf-util/roles-viewroles-html.lsp | 4 ++-- app/acf_www-controller.lua | 3 ++- app/dispatcherror-html.lsp | 4 ++-- app/exception-html.lsp | 4 ++-- app/template-html.lsp | 8 ++++---- www/index.html | 2 +- 7 files changed, 14 insertions(+), 13 deletions(-) diff --git a/app/acf-util/password-status-html.lsp b/app/acf-util/password-status-html.lsp index a26bdee..1f9bb13 100644 --- a/app/acf-util/password-status-html.lsp +++ b/app/acf-util/password-status-html.lsp @@ -12,7 +12,7 @@

Existing account

<% for name,user in pairs(form.value) do %> -
<%= html.html_escape(name) %>
+
<%= html.html_escape(name) %>
diff --git a/app/acf-util/roles-viewroles-html.lsp b/app/acf-util/roles-viewroles-html.lsp index c7d6fc5..5221fce 100644 --- a/app/acf-util/roles-viewroles-html.lsp +++ b/app/acf-util/roles-viewroles-html.lsp @@ -15,7 +15,7 @@
<%= html.html_escape(user.value.userid.label) %>
<% if view.value.defined_roles then %> <% for x,role in pairs(view.value.defined_roles.value) do %> -
<%= html.html_escape(role) %>
+
<%= html.html_escape(role) %>
[View this role] [Edit this role] @@ -25,7 +25,7 @@ <% end %> <% if view.value.default_roles then %> <% for x,role in pairs(view.value.default_roles.value) do %> -
<%= html.html_escape(role) %>
+
<%= html.html_escape(role) %>
[View this role] [Edit this role] diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua index 0b6d80d..e99ffa5 100644 --- a/app/acf_www-controller.lua +++ b/app/acf_www-controller.lua @@ -220,7 +220,7 @@ local view_resolver = function(self) action = self.conf.action, prefix = self.conf.prefix, script = self.conf.script, - appname = self.conf.appname, + wwwprefix = self.conf.wwwprefix or "", staticdir = self.conf.staticdir or "", skin = self.conf.skin or "", orig_action = self.conf.orig_action or self.conf.prefix .. self.conf.controller .. "/" .. self.conf.action, @@ -389,6 +389,7 @@ dispatch = function (self, userprefix, userctlr, useraction) if userprefix == nil then self.conf.prefix, self.conf.controller, self.conf.action = parse_path_info(ENV["PATH_INFO"]) + self.conf.wwwprefix = string.gsub(ENV["SCRIPT_NAME"] or "", "/?cgi%-bin/acf.*", "") else self.conf.prefix = userprefix self.conf.controller = userctlr or "" diff --git a/app/dispatcherror-html.lsp b/app/dispatcherror-html.lsp index fde2f03..a72c148 100644 --- a/app/dispatcherror-html.lsp +++ b/app/dispatcherror-html.lsp @@ -1,4 +1,4 @@ -<% view = ... %> +<% view, viewlibrary, page_info = ... %> - + +