diff options
author | Karl Palsson <karlp@remake.is> | 2015-09-02 11:24:29 +0000 |
---|---|---|
committer | Karl Palsson <karlp@remake.is> | 2015-09-02 15:27:55 +0000 |
commit | 879d9ff2b8f80b7c8e4adadf0702154d9ae932f4 (patch) | |
tree | 7c133cb360fd5cd60b3d94529eaa81513eef9a70 /modules/luci-base/luasrc/model/uci.luadoc | |
parent | f0083abed10e8a397ebe9e62801e3b5d536ba7b6 (diff) |
uci:set_list: Delete option if the list is empty
Allows lists fetched with get_list to be modified and simply passed back
to set_list. Explicitly calling set_list() with an empty list is clearly
requesting that there be zero list items, ie, deletion of the option
altogether.
Signed-off-by: Karl Palsson <karlp@remake.is>
Diffstat (limited to 'modules/luci-base/luasrc/model/uci.luadoc')
-rw-r--r-- | modules/luci-base/luasrc/model/uci.luadoc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/luci-base/luasrc/model/uci.luadoc b/modules/luci-base/luasrc/model/uci.luadoc index 80464f7cec..f3aa609d59 100644 --- a/modules/luci-base/luasrc/model/uci.luadoc +++ b/modules/luci-base/luasrc/model/uci.luadoc @@ -104,14 +104,15 @@ Get the given option from the first section with the given type. ]] ---[[ -Set given values as list. +Set given values as list. Setting a list option to an empty list +has the same effect as deleting the option. @class function @name Cursor.set_list @param config UCI config @param section UCI section name @param option UCI option -@param value UCI value +@param value value or table. Raw values will become a single item table. @return Boolean whether operation succeeded ]] |