diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-09-07 16:17:43 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-09-07 16:17:43 +0000 |
commit | 1aa81b4ae095cea55119e8bc4142fbfb61cf40ff (patch) | |
tree | 9cc6735ec8d66824cd7389099abda33f8eb95dfe /applications/luci-statistics | |
parent | 0a96f6de35b0a1c8fd75b62499d311c6f268b2bc (diff) |
applications/luci-statistics: add missing return in _expand()
Diffstat (limited to 'applications/luci-statistics')
-rwxr-xr-x | applications/luci-statistics/root/usr/bin/stat-genconfig | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/applications/luci-statistics/root/usr/bin/stat-genconfig b/applications/luci-statistics/root/usr/bin/stat-genconfig index 171c1ae73..4cf39460e 100755 --- a/applications/luci-statistics/root/usr/bin/stat-genconfig +++ b/applications/luci-statistics/root/usr/bin/stat-genconfig @@ -200,22 +200,19 @@ function _list_expand( c, l, nopad ) end function _expand( s, n, nopad ) - if type(s) == "string" then - local str = "" + local str = "" + if type(s) == "string" then for i, v in ipairs( luci.util.split( s, "%s+", nil, true ) ) do str = str .. _string( v, n, nopad ) end - - return str - elseif type(s) == "table" then - local str = "" - for i, v in ipairs(s) do str = str .. _string( v, n, nopad ) end end + + return str end function _bool( s, n, nopad ) |