Merge pull request #2462 from cshoredaniel/luci-rad2-pass-go-fix
luci-app-radicale2: A couple of fixes for radicale2 UI
This commit is contained in:
commit
c81ae86847
2 changed files with 13 additions and 27 deletions
|
@ -135,33 +135,19 @@ function encpass(self, section)
|
||||||
return encvalue and encvalue.encrypted_password
|
return encvalue and encvalue.encrypted_password
|
||||||
end
|
end
|
||||||
|
|
||||||
pass.parse = function(self, section, novld)
|
pass.cfgvalue = function(self, section)
|
||||||
local encvalue
|
if not plainpass:formvalue(section) then
|
||||||
if self:cfgvalue(section) then
|
return Value.cfgvalue(self, section)
|
||||||
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
|
|
||||||
else
|
else
|
||||||
encvalue = encpass(self, section)
|
return Value.formvalue(self, section)
|
||||||
if encvalue then
|
end
|
||||||
self.formvalue = function(self, section)
|
end
|
||||||
return encvalue
|
|
||||||
end
|
pass.formvalue = function(self, section)
|
||||||
return Value.parse(self, section, novld)
|
if not plainpass:formvalue(section) then
|
||||||
else
|
return Value.formvalue(self, section)
|
||||||
return nil
|
else
|
||||||
end
|
return encpass(self, section) or Value.formvalue(self, section)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<%
|
<%
|
||||||
local uci = require "luci.model.uci".cursor()
|
local uci = require "luci.model.uci".cursor()
|
||||||
local http_port = uci:get("radicale2", "server", "host")
|
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
|
if type(http_port) == "table" then
|
||||||
http_port = http_port[1]
|
http_port = http_port[1]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue