summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-12-18 09:44:42 +0000
committerTed Trask <ttrask01@yahoo.com>2009-12-18 09:44:42 +0000
commitb5b8c138deb5d4b4216c9186e3d528792edc70b2 (patch)
tree9443d94bc41e0a6e4f4333a3642efa16139983bf /app
parent1b8a047f7d1c71a1efd0bd34b5f887086a857b20 (diff)
downloadacf-core-b5b8c138deb5d4b4216c9186e3d528792edc70b2.tar.bz2
acf-core-b5b8c138deb5d4b4216c9186e3d528792edc70b2.tar.xz
Made command-line client work.
Diffstat (limited to 'app')
-rw-r--r--app/Makefile1
-rw-r--r--app/acf_cli-controller.lua21
2 files changed, 16 insertions, 6 deletions
diff --git a/app/Makefile b/app/Makefile
index 4616aac..ba4258a 100644
--- a/app/Makefile
+++ b/app/Makefile
@@ -19,6 +19,7 @@ APP_DIST= \
acf-util/password-status-html.lsp \
acf-util/password.menu \
acf_www-controller.lua\
+ acf_cli-controller.lua\
menuhints.menu\
template-html.lsp\
template-stream.lsp\
diff --git a/app/acf_cli-controller.lua b/app/acf_cli-controller.lua
index 60d9a9e..e3f160d 100644
--- a/app/acf_cli-controller.lua
+++ b/app/acf_cli-controller.lua
@@ -5,7 +5,6 @@ local parent_exception_handler
mvc = {}
mvc.on_load = function (self, parent)
-
-- Make sure we have some kind of sane defaults for libdir and sessiondir
self.conf.libdir = self.conf.libdir or ( self.conf.appdir .. "/lib/" )
self.conf.sessiondir = self.conf.sessiondir or "/tmp/"
@@ -29,16 +28,26 @@ end
view_resolver = function(self)
- return function (viewtable)
- print(viewtable)
- end
+ return function (viewtable)
+ print(session.serialize("result", viewtable))
+ end
end
+--[[ The parent exception handler is just fine
exception_handler = function (self, message )
- print(message)
+ print(session.serialize("exception", message))
+end
+--]]
+
+redirect = function (self, str, result)
+ return result
+end
+
+redirect_to_referrer = function(self, result)
+ return result
end
-- syslog something
-logit = function ( ... )
+logevent = function ( ... )
os.execute ( "logger \"" .. ... .. "\"" )
end