summaryrefslogtreecommitdiffstats
path: root/weblog-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2015-12-30 14:16:27 +0000
committerTed Trask <ttrask01@yahoo.com>2015-12-30 18:18:59 +0000
commitffa7d88fbc30ef500e108325f48826159d4309f8 (patch)
tree015445a37685b391cfb39e19e677e88e8f794bd2 /weblog-model.lua
parent789ccadd90f2d72ee78003dd0564862adb383d89 (diff)
downloadacf-weblog-ffa7d88fbc30ef500e108325f48826159d4309f8.tar.bz2
acf-weblog-ffa7d88fbc30ef500e108325f48826159d4309f8.tar.xz
Change listfiles filesize to size, size and mtime not user-friendly, use posix.stat over fs.stat, use new format functions
Diffstat (limited to 'weblog-model.lua')
-rw-r--r--weblog-model.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/weblog-model.lua b/weblog-model.lua
index 3f1247e..682b093 100644
--- a/weblog-model.lua
+++ b/weblog-model.lua
@@ -742,7 +742,7 @@ end
-- PUBLIC FUNCTIONS
function mymodule.getsourcelist()
- local retval = cfe({ type="list", value={}, label="Weblog Source List" })
+ local retval = cfe({ type="structure", value={}, label="Weblog Source List" })
local res, err = pcall(function()
databaseconnect(DatabaseUser)
retval.value = listsourceentries()
@@ -1482,9 +1482,9 @@ function mymodule.create_database(self, database)
end
function mymodule.listfiles()
- local retval = cfe({ type="list", value={}, label="Weblog Files" })
+ local retval = cfe({ type="structure", value={}, label="Weblog Files" })
for i,file in ipairs(files) do
- local details = fs.stat(file) or {}
+ local details = posix.stat(file) or {}
details.filename = file
retval.value[#retval.value + 1] = details
end