summaryrefslogtreecommitdiffstats
path: root/www/cgi-bin/mvc.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-12-30 14:33:49 +0000
committerTed Trask <ttrask01@yahoo.com>2009-12-30 14:33:49 +0000
commit6c9f16f82e911e1b2c05918f9b8ce0d78fb3aa55 (patch)
tree30dc8373ce37fab5ac71d2a7b2902da0c3535e65 /www/cgi-bin/mvc.lua
parent38c8fad89c24a031b4c88e94066797a00b7774ab (diff)
downloadacf-core-6c9f16f82e911e1b2c05918f9b8ce0d78fb3aa55.tar.bz2
acf-core-6c9f16f82e911e1b2c05918f9b8ce0d78fb3aa55.tar.xz
Cleaned up acf.conf, removed hardcoded /usr/share/acf paths.
Diffstat (limited to 'www/cgi-bin/mvc.lua')
-rw-r--r--www/cgi-bin/mvc.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/www/cgi-bin/mvc.lua b/www/cgi-bin/mvc.lua
index c7afdcd..db29bda 100644
--- a/www/cgi-bin/mvc.lua
+++ b/www/cgi-bin/mvc.lua
@@ -242,13 +242,10 @@ read_config = function( self, appname )
local file = io.open (filename)
if (file) then
self.conf.confdir = posix.dirname(filename) .. "/"
+ self.conf.conffile = filename
for line in file:lines() do
- key, value = string.match(line, "([^[=]*)=[ \t]*(.*)")
- if key then -- ugly way of finding blank spots between key and =
- repeat
- local space = string.find ( key, "%s", -1)
- if space then key=string.sub(key,1,space-1) end
- until space == nil
+ key, value = string.match(line, "^%s*([^[=%s#]*)%s*=%s*(.*)")
+ if key then
self.conf[key] = value
end
end