diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-04-13 12:22:13 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-04-13 12:22:13 +0200 |
commit | 55cb5a753b94e2eee049546a2af374bb6129d4c4 (patch) | |
tree | 050c107b132ad6e7adb1d733f7a39d1a8026d7b7 /modules/luci-base/htdocs/luci-static | |
parent | 0d0ad80fd1b96ff2c33392387320ad518640782b (diff) |
luci-base: uci.js: fix variable clash
Don't overwrite the `r` variable which is supposed to refer to the reordered
uci sections with temporary data for collecting uci add parameters.
Fixes stray uci/get permission errors caused by an attempt to load
nonsensical uci package names.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/uci.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/uci.js b/modules/luci-base/htdocs/luci-static/resources/uci.js index adec6fb88d..f97cd8e354 100644 --- a/modules/luci-base/htdocs/luci-static/resources/uci.js +++ b/modules/luci-base/htdocs/luci-static/resources/uci.js @@ -790,22 +790,22 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ { if (n) for (var conf in n) { for (var sid in n[conf]) { - var r = { + var p = { config: conf, values: { } }; for (var k in n[conf][sid]) { if (k == '.type') - r.type = n[conf][sid][k]; + p.type = n[conf][sid][k]; else if (k == '.create') - r.name = n[conf][sid][k]; + p.name = n[conf][sid][k]; else if (k.charAt(0) != '.') - r.values[k] = n[conf][sid][k]; + p.values[k] = n[conf][sid][k]; } snew.push(n[conf][sid]); - tasks.push(self.callAdd(r.config, r.type, r.name, r.values)); + tasks.push(self.callAdd(p.config, p.type, p.name, p.values)); } pkgs[conf] = true; |