Mercurial > prosody-hg
comparison core/configmanager.lua @ 6717:4fecfc81dac1
configmanager: Rename unused function arguments [luacheck]
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 18 May 2015 19:07:06 +0100 |
| parents | 2b78754b0f1c |
| children | be98ebe87eef |
comparison
equal
deleted
inserted
replaced
| 6716:2b78754b0f1c | 6717:4fecfc81dac1 |
|---|---|
| 126 -- The ' = true' are needed so as not to set off __newindex when we assign the functions below | 126 -- The ' = true' are needed so as not to set off __newindex when we assign the functions below |
| 127 env = setmetatable({ | 127 env = setmetatable({ |
| 128 Host = true, host = true, VirtualHost = true, | 128 Host = true, host = true, VirtualHost = true, |
| 129 Component = true, component = true, | 129 Component = true, component = true, |
| 130 Include = true, include = true, RunScript = true }, { | 130 Include = true, include = true, RunScript = true }, { |
| 131 __index = function (t, k) | 131 __index = function (_, k) |
| 132 return rawget(_G, k); | 132 return rawget(_G, k); |
| 133 end, | 133 end, |
| 134 __newindex = function (t, k, v) | 134 __newindex = function (_, k, v) |
| 135 set(config, env.__currenthost or "*", k, v); | 135 set(config_table, env.__currenthost or "*", k, v); |
| 136 end | 136 end |
| 137 }); | 137 }); |
| 138 | 138 |
| 139 rawset(env, "__currenthost", "*") -- Default is global | 139 rawset(env, "__currenthost", "*") -- Default is global |
| 140 function env.VirtualHost(name) | 140 function env.VirtualHost(name) |
