summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-09 20:20:17 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-09 20:20:17 +0000
commit65d76efca6fdc54b449ea396d70faae4d990b05a (patch)
tree6689f8ff855f6eb858b5fc34483ea396513c61e0
parent2a8918a9e123d77c489a4f3df035f5d6d309498c (diff)
downloadacf-alpine-conf-65d76efca6fdc54b449ea396d70faae4d990b05a.tar.bz2
acf-alpine-conf-65d76efca6fdc54b449ea396d70faae4d990b05a.tar.xz
Change use of require to work with Lua 5.2
-rw-r--r--lbu-config-html.lsp2
-rw-r--r--lbu-listbackups-html.lsp2
-rw-r--r--lbu-listchanges-html.lsp2
-rw-r--r--lbu-model.lua6
-rw-r--r--lbu-status-html.lsp2
5 files changed, 7 insertions, 7 deletions
diff --git a/lbu-config-html.lsp b/lbu-config-html.lsp
index 6a720d1..edb8f2f 100644
--- a/lbu-config-html.lsp
+++ b/lbu-config-html.lsp
@@ -1,5 +1,5 @@
<% local form, viewlibrary, page_info, session = ...
-require("htmlviewfunctions")
+htmlviewfunctions = require("htmlviewfunctions")
%>
<% htmlviewfunctions.displaycommandresults({"editincluded", "editexcluded", "selectbackup"}, session, true) %>
diff --git a/lbu-listbackups-html.lsp b/lbu-listbackups-html.lsp
index 16ac96f..67f2efc 100644
--- a/lbu-listbackups-html.lsp
+++ b/lbu-listbackups-html.lsp
@@ -1,5 +1,5 @@
<% local view, viewlibrary, pageinfo, session = ...
-require("htmlviewfunctions")
+htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>
diff --git a/lbu-listchanges-html.lsp b/lbu-listchanges-html.lsp
index e15a9a0..71d9ea7 100644
--- a/lbu-listchanges-html.lsp
+++ b/lbu-listchanges-html.lsp
@@ -1,5 +1,5 @@
<% local view, viewlibrary, page_info, session = ...
-require("htmlviewfunctions")
+htmlviewfunctions = require("htmlviewfunctions")
html = require("acf.html")
%>
diff --git a/lbu-model.lua b/lbu-model.lua
index f6c9d2a..7c58b01 100644
--- a/lbu-model.lua
+++ b/lbu-model.lua
@@ -1,8 +1,8 @@
module (..., package.seeall)
-- Load libraries
-require("posix")
-require("modelfunctions")
+posix = require("posix")
+modelfunctions = require("modelfunctions")
fs = require("acf.fs")
format = require("acf.format")
validator = require("acf.validator")
@@ -388,7 +388,7 @@ end
function getpackage()
-- create a temporary directory to store the file
- require("session")
+ session = require("session")
local tmp = "/tmp/"..session.random_hash(10)
while posix.stat( tmp ) do
tmp = "/tmp/"..session.random_hash(10)
diff --git a/lbu-status-html.lsp b/lbu-status-html.lsp
index 932ced1..c47bfe2 100644
--- a/lbu-status-html.lsp
+++ b/lbu-status-html.lsp
@@ -1,5 +1,5 @@
<% local view, viewlibrary, pageinfo, session = ...
-require("htmlviewfunctions")
+htmlviewfunctions = require("htmlviewfunctions")
%>
<H1>System Info</H1>