summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-core
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-11-21 19:29:47 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-11-21 19:29:47 +0000
commit69ac1031b7e83fb68ee1f6f952890fc0654f54f8 (patch)
tree4f220decbd7c7e9a796431db67079e9687dc372b /modules/admin-core
parentef8e4eb991a1b496085c57f6b8381b623311db89 (diff)
applications/luci-commands, applications/luci-upnp, modules/admin-core, modules/admin-full, modules/freifunk: clean up argument handling of leaf nodes
Diffstat (limited to 'modules/admin-core')
-rw-r--r--modules/admin-core/luasrc/controller/admin/servicectl.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/admin-core/luasrc/controller/admin/servicectl.lua b/modules/admin-core/luasrc/controller/admin/servicectl.lua
index 68a59364c2..753d2c77f1 100644
--- a/modules/admin-core/luasrc/controller/admin/servicectl.lua
+++ b/modules/admin-core/luasrc/controller/admin/servicectl.lua
@@ -30,15 +30,13 @@ function action_status()
end
end
-function action_restart()
+function action_restart(args)
local uci = require "luci.model.uci".cursor()
- local rqp = luci.dispatcher.context.requestpath
-
- if rqp[3] then
+ if args then
local service
local services = { }
- for service in rqp[3]:gmatch("[%w_-]+") do
+ for service in args:gmatch("[%w_-]+") do
services[#services+1] = service
end