diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-05-15 13:51:21 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-05-15 13:51:21 +0000 |
commit | 29ddbdbfd9dcc3a339219e64394e61fc68406d83 (patch) | |
tree | 06f83f40382e95a4b722390216bfe2adcefeb1ee | |
parent | debe0a8aa654e7ea9375552741ab9c3968d60a1f (diff) | |
download | acf-openvpn-29ddbdbfd9dcc3a339219e64394e61fc68406d83.tar.bz2 acf-openvpn-29ddbdbfd9dcc3a339219e64394e61fc68406d83.tar.xz |
Replaced references to ENV[SCRIPT_NAME] with self.conf.script.
Logon link no longer forced to be https.
git-svn-id: svn://svn.alpinelinux.org/acf/openvpn/trunk@1120 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | openvpn-controller.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/openvpn-controller.lua b/openvpn-controller.lua index 5876189..54a28e2 100644 --- a/openvpn-controller.lua +++ b/openvpn-controller.lua @@ -6,18 +6,18 @@ default_action = "status" status = function (self) -- FIXME: If return 1 rows go direct to that config-page - return ( {conflistfiles = self.model:get_conflist(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller, version = self.model:openvpn_version()} ) + return ( {conflistfiles = self.model:get_conflist(), url = self.conf.script .. self.conf.prefix .. self.conf.controller, version = self.model:openvpn_version()} ) end serverconfig = function (self) local configname = self.clientdata.name or "" - return ( {config = self.model:get_config(configname), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} ) + return ( {config = self.model:get_config(configname), url = self.conf.script .. self.conf.prefix .. self.conf.controller} ) end clientconfig = function (self) local configname = self.clientdata.name or "" - return ( {config = self.model:get_config(configname), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} ) + return ( {config = self.model:get_config(configname), url = self.conf.script .. self.conf.prefix .. self.conf.controller} ) end peminfo = function (self) @@ -25,7 +25,7 @@ end statusinfo = function (self) local configname = self.clientdata.name or "" - return ( {clientlist = self.model:clientlist(configname), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} ) + return ( {clientlist = self.model:clientlist(configname), url = self.conf.script .. self.conf.prefix .. self.conf.controller} ) end unknownconfig = function (self) @@ -34,7 +34,7 @@ unknownconfig = function (self) ---[[ if ( filecontent ~= "") then - local me = ( {configfilecontent = self.model:update_filecontent(filename,filecontent), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller } ) + local me = ( {configfilecontent = self.model:update_filecontent(filename,filecontent), url = self.conf.script .. self.conf.prefix .. self.conf.controller } ) if ( me.configfilecontent == nil ) then redirect(self) else @@ -42,14 +42,14 @@ unknownconfig = function (self) end else ---[=[ - local me = ( {configfilecontent = self.model:get_filecontent(filename), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller } ) + local me = ( {configfilecontent = self.model:get_filecontent(filename), url = self.conf.script .. self.conf.prefix .. self.conf.controller } ) if ( me.configfilecontent == nil ) then redirect(self) else return me end --]=] --- return ( {configfilecontent = self.model:get_filecontent(filename), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} ) +-- return ( {configfilecontent = self.model:get_filecontent(filename), url = self.conf.script .. self.conf.prefix .. self.conf.controller} ) end --]] @@ -59,5 +59,5 @@ end logfile = function (self) local configname = self.clientdata.name or "" -- FIXME: If return 0 rows, goto read - return ( {logfilecontent = self.model:get_logfile(configname), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller } ) + return ( {logfilecontent = self.model:get_logfile(configname), url = self.conf.script .. self.conf.prefix .. self.conf.controller } ) end |