diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-09 19:24:30 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-09 19:24:30 +0000 |
commit | fcaab1b363fcd5ff2dccce8f98cacabc5635ba5f (patch) | |
tree | cd28bbb1bc80b0a36de234768fd6f3b75b8fcc9c /lua | |
parent | e07736354b22bef2599d1831a6ba435808c0630d (diff) | |
download | acf-core-fcaab1b363fcd5ff2dccce8f98cacabc5635ba5f.tar.bz2 acf-core-fcaab1b363fcd5ff2dccce8f98cacabc5635ba5f.tar.xz |
Change use of require to work with Lua 5.2
Diffstat (limited to 'lua')
-rwxr-xr-x | lua/mvc.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lua/mvc.lua b/lua/mvc.lua index 51e6eaa..a9619ae 100755 --- a/lua/mvc.lua +++ b/lua/mvc.lua @@ -6,8 +6,8 @@ ]]-- module(..., package.seeall) -require("posix") -require("subprocess") +posix = require("posix") +subprocess = require("subprocess") format = require("acf.format") -- For security, set the path @@ -340,10 +340,10 @@ end -- The view of last resort auto_view = function(viewtable, viewlibrary, pageinfo, session) if pageinfo.viewtype == "html" then - require("htmlviewfunctions") + local htmlviewfunctions = require("htmlviewfunctions") htmlviewfunctions.displayitem(viewtable, 1, pageinfo) elseif pageinfo.viewtype == "json" then - require("json") + local json = require("json") print(json.encode(viewtable)) elseif pageinfo.viewtype == "stream" then io.write(viewtable.value) |