uci:set_list: Delete option if the list is empty
[project/luci.git] / modules / luci-base / luasrc / model / uci.luadoc
index 1c20866..f3aa609 100644 (file)
@@ -8,8 +8,8 @@ Cursor.commit the data to the actual config files.
 LuCI then needs to Cursor.apply the changes so deamons etc. are
 reloaded.
 @cstyle        instance
-module "luci.model.uci"
 ]]
+module "luci.model.uci"
 
 ---[[
 Create a new UCI-Cursor.
@@ -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
 ]]