summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2019-01-26 15:32:57 +0200
committerGitHub <noreply@github.com>2019-01-26 15:32:57 +0200
commitc81ae86847bd96c42f075df360dce8d075c08e5c (patch)
treee9d62d255810f63811f2a3762686a96cb135768d /applications
parent84ff9094ce0643c3baef16bc37be99f48a3c1720 (diff)
parent11cff5374ba8287a6671a68c8eb4f228714c9e98 (diff)
Merge pull request #2462 from cshoredaniel/luci-rad2-pass-go-fix
luci-app-radicale2: A couple of fixes for radicale2 UI
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua38
-rw-r--r--applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm2
2 files changed, 13 insertions, 27 deletions
diff --git a/applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua b/applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua
index 71fd3a32ee..b352bb46aa 100644
--- a/applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua
+++ b/applications/luci-app-radicale2/luasrc/model/cbi/radicale2/auth.lua
@@ -135,33 +135,19 @@ function encpass(self, section)
return encvalue and encvalue.encrypted_password
end
-pass.parse = function(self, section, novld)
- local encvalue
- if self:cfgvalue(section) then
- if not plainpass:cfgvalue(section) then
- return Value.parse(self, section)
- else
- encvalue = encpass(self, section)
- if encvalue then
- self.formvalue = function(self, section)
- return encvalue
- end
- return Value.parse(self, section, novld)
- else
- self.formvalue = self.cfgvalue
- return Value.parse(self, section, novld)
- end
- end
+pass.cfgvalue = function(self, section)
+ if not plainpass:formvalue(section) then
+ return Value.cfgvalue(self, section)
else
- encvalue = encpass(self, section)
- if encvalue then
- self.formvalue = function(self, section)
- return encvalue
- end
- return Value.parse(self, section, novld)
- else
- return nil
- end
+ return Value.formvalue(self, section)
+ end
+end
+
+pass.formvalue = function(self, section)
+ if not plainpass:formvalue(section) then
+ return Value.formvalue(self, section)
+ else
+ return encpass(self, section) or Value.formvalue(self, section)
end
end
diff --git a/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm b/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm
index 2f449d7b0b..1bcf388bd6 100644
--- a/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm
+++ b/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm
@@ -1,7 +1,7 @@
<%
local uci = require "luci.model.uci".cursor()
local http_port = uci:get("radicale2", "server", "host")
-local usessl = uci:get("radicale2", "server", "ssl")
+local usessl = uci:get_bool("radicale2", "server", "ssl")
if type(http_port) == "table" then
http_port = http_port[1]
end