Software /
code /
prosody
Comparison
core/configmanager.lua @ 6712:29d5875ae38d
configmanager: Rename variable to avoid name conflict [luacheck]
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 18 May 2015 19:03:07 +0100 |
parent | 6326:a3b9496673ee |
child | 6713:b628870b1bd6 |
comparison
equal
deleted
inserted
replaced
6711:76683a3f3d75 | 6712:29d5875ae38d |
---|---|
52 if hostconfig then | 52 if hostconfig then |
53 return rawget(hostconfig, key); | 53 return rawget(hostconfig, key); |
54 end | 54 end |
55 end | 55 end |
56 | 56 |
57 local function set(config, host, key, value) | 57 local function set(config_table, host, key, value) |
58 if host and key then | 58 if host and key then |
59 local hostconfig = rawget(config, host); | 59 local hostconfig = rawget(config_table, host); |
60 if not hostconfig then | 60 if not hostconfig then |
61 hostconfig = rawset(config, host, setmetatable({}, host_mt))[host]; | 61 hostconfig = rawset(config_table, host, setmetatable({}, host_mt))[host]; |
62 end | 62 end |
63 hostconfig[key] = value; | 63 hostconfig[key] = value; |
64 return true; | 64 return true; |
65 end | 65 end |
66 return false; | 66 return false; |