From: Rafał Miłecki Date: Fri, 27 Jun 2014 19:38:35 +0000 (+0000) Subject: luci2: UCIContext: add: respect "name" if passed X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=501640081f58deec167cc44251e14e78ace710bb;p=project%2Fluci2%2Fui.git luci2: UCIContext: add: respect "name" if passed This allows creating UCI entries with a desired name, e.g. config interface 'guestlan' Signed-off-by: Rafał Miłecki --- diff --git a/luci2/htdocs/luci2/luci2.js b/luci2/htdocs/luci2/luci2.js index 2a2a359..040f1e5 100644 --- a/luci2/htdocs/luci2/luci2.js +++ b/luci2/htdocs/luci2/luci2.js @@ -974,7 +974,7 @@ function LuCI2() add: function(conf, type, name) { var n = this.state.creates; - var sid = this.createSID(conf); + var sid = name || this.createSID(conf); if (!n[conf]) n[conf] = { };