libs/web: add missing parts of previous commit
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 16 Dec 2011 01:18:34 +0000 (01:18 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 16 Dec 2011 01:18:34 +0000 (01:18 +0000)
libs/web/luasrc/cbi/datatypes.lua

index 3c768ab..93b29cb 100644 (file)
@@ -154,6 +154,10 @@ function host(val)
        return hostname(val) or ipaddr(val)
 end
 
+function network(val)
+       return uciname(val) or host(val)
+end
+
 function wpakey(val)
        if #val == 64 then
                return (val:match("^[a-fA-F0-9]+$") ~= nil)