diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-02-02 14:24:24 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-02-02 14:24:24 +0000 |
commit | 27c777f203a409442ca184f3aa20e703b4784927 (patch) | |
tree | 7552db683d705ad53eeb003a5f748448ea512281 /bin | |
parent | 66ce6092f2f81e8a0dc01c340f5d7d9d7b81d1cb (diff) | |
download | acf-core-27c777f203a409442ca184f3aa20e703b4784927.tar.bz2 acf-core-27c777f203a409442ca184f3aa20e703b4784927.tar.xz |
Fixed acf-cli to work with new mvc.lua changes
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/acf-cli | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/bin/acf-cli b/bin/acf-cli index a0560a7..d2f7006 100755 --- a/bin/acf-cli +++ b/bin/acf-cli @@ -21,27 +21,22 @@ end require("posix") mvc = require("acf.mvc") --- this is to get around having to store --- the config file in /etc/helloworld/helloworld.conf -ENV={} -ENV.HOME="." FRAMEWORK=mvc:new() FRAMEWORK:read_config("acf") APP=FRAMEWORK:new("acf_cli") -- command line will have URI-type string defining prefix/controller/action --- (put into ENV.PATH_INFO) -- followed by parameters --- (put into APP.clientdata) -APP.clientdata = {} +local p,c,a = APP.parse_path_info(arg[1]) +local clientdata = {} for i=2,#arg do a,v = string.match(arg[i], "([^=]*)=(.*)") if v then - APP.clientdata[a] = v + clientdata[a] = v else - APP.clientdata[arg[i]] = true + clientdata[arg[i]] = true end end -APP:dispatch(APP.parse_path_info(arg[1])) +APP:dispatch(p,c,a,clientdata) APP:destroy() FRAMEWORK:destroy() |