summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2016-01-18 15:46:55 +0000
committerTed Trask <ttrask01@yahoo.com>2016-01-18 15:46:55 +0000
commit9ce48686e81f7ace3028a630c91795a8e76ea6a5 (patch)
treec43057f45ab0cd283b3fff780ed520184a06e625
parent8a180f8a449ab86e1f7e22459e0512ee3ac613f1 (diff)
downloadacf-provisioning-9ce48686e81f7ace3028a630c91795a8e76ea6a5.tar.bz2
acf-provisioning-9ce48686e81f7ace3028a630c91795a8e76ea6a5.tar.xz
Bump version to 0.8.7v0.8.7
-rw-r--r--Makefile2
-rw-r--r--provisioning-listfiles-html.lsp4
-rw-r--r--provisioning-listtemplates-html.lsp20
-rw-r--r--provisioning-model.lua6
4 files changed, 16 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 57756cb..a66aae9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
APP_NAME=provisioning
PACKAGE=acf-$(APP_NAME)
-VERSION=0.8.6
+VERSION=0.8.7
APP_DIST=\
provisioning* \
diff --git a/provisioning-listfiles-html.lsp b/provisioning-listfiles-html.lsp
index 5763912..e92e43f 100644
--- a/provisioning-listfiles-html.lsp
+++ b/provisioning-listfiles-html.lsp
@@ -39,8 +39,8 @@ html = require("acf.html")
<tr>
<td><% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Edit", action="editfile"}), page_info, -1) %></td>
<td><%= html.html_escape(file.filename) %></td>
- <td><span class="hide"><%= html.html_escape(file.orig_size) %>b</span><%= html.html_escape(file.size) %></td>
- <td><%= html.html_escape(file.mtime) %></td>
+ <td><span class="hide"><%= html.html_escape(file.size or 0) %>b</span><%= format.formatfilesize(file.size) %></td>
+ <td><%= format.formattime(file.mtime) %></td>
</tr>
<% end %>
</tbody></table>
diff --git a/provisioning-listtemplates-html.lsp b/provisioning-listtemplates-html.lsp
index 579119d..47226d7 100644
--- a/provisioning-listtemplates-html.lsp
+++ b/provisioning-listtemplates-html.lsp
@@ -38,25 +38,25 @@ html = require("acf.html")
</thead><tbody>
<% local filename = cfe({ type="hidden", value="" }) %>
<% local redir = cfe({ type="hidden", value=page_info.orig_action }) %>
-<% for k,v in ipairs( view.value ) do %>
+<% for i,file in ipairs( view.value ) do %>
<tr>
<td>
- <% filename.value = v.filename %>
- <% if viewlibrary.check_permission("edittemplate") and v.label then %>
+ <% filename.value = file.filename %>
+ <% if viewlibrary.check_permission("edittemplate") and file.label then %>
<% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Edit", action="edittemplate"}), page_info, -1) %>
<% end %>
- <% if viewlibrary.check_permission("deletetemplate") and v.label then %>
+ <% if viewlibrary.check_permission("deletetemplate") and file.label then %>
<% htmlviewfunctions.displayitem(cfe({type="form", value={filename=filename}, label="", option="Delete", action="deletetemplate", class="deletetemplate"}), page_info, -1) %>
<% end %>
- <% if viewlibrary.check_permission("createtemplate") and not v.label then %>
+ <% if viewlibrary.check_permission("createtemplate") and not file.label then %>
<% htmlviewfunctions.displayitem(cfe({type="link", value={filename=filename, redir=redir}, label="", option="Create", action="createtemplate"}), page_info, -1) %>
<% end %>
</td>
- <td><%= html.html_escape(v.filename) %></td>
- <td><%= html.html_escape(v.label) %></td>
- <td><%= html.html_escape(v.seq) %></td>
- <td><span class="hide"><%= html.html_escape(v.orig_size) %>b</span><%= html.html_escape(v.size) %></td>
- <td><%= html.html_escape(v.mtime) %></td>
+ <td><%= html.html_escape(file.filename) %></td>
+ <td><%= html.html_escape(file.label) %></td>
+ <td><%= html.html_escape(file.seq) %></td>
+ <td><span class="hide"><%= html.html_escape(file.size or 0) %>b</span><%= format.formatfilesize(file.size) %></td>
+ <td><%= format.formattime(file.mtime) %></td>
</tr>
<% end %>
</tbody>
diff --git a/provisioning-model.lua b/provisioning-model.lua
index 34f8572..d24e1af 100644
--- a/provisioning-model.lua
+++ b/provisioning-model.lua
@@ -571,7 +571,7 @@ mymodule.list_templates = function()
fs.create_directory(baseurl)
for f in posix.files(baseurl) do
local file = baseurl..f
- local details = fs.stat(file)
+ local details = posix.stat(file)
if details.type == "regular" then
if not reversed[file] then
retval[#retval+1] = {filename=file}
@@ -621,7 +621,7 @@ mymodule.get_template = function(self, clientdata)
end
end
local filedetails = modelfunctions.getfiledetails(retval.filename.value, function(filename) return validator.is_valid_filename(filename, baseurl) end)
- for i,n in ipairs({"filecontent", "filesize", "mtime"}) do
+ for i,n in ipairs({"filecontent", "size", "mtime"}) do
retval[n] = filedetails.value[n]
end
@@ -2012,7 +2012,7 @@ end
function mymodule.list_files()
local retval = {}
for i,file in ipairs(scriptfiles) do
- local details = fs.stat(file) or {}
+ local details = posix.stat(file) or {}
details.filename = file
table.insert(retval, details)
end