Merge pull request #1986 from dibdot/adblock
[project/luci.git] / applications / luci-app-adblock / luasrc / controller / adblock.lua
index 664822140ffd562f2dfcffb6109a0cbded1bbea5..fad8834870c0e3744cbf9f0ddc331f06563f8ebe 100644 (file)
@@ -30,12 +30,12 @@ function index()
        entry({"admin", "services", "adblock", "action"}, call("adb_action"), nil).leaf = true
 end
 
-function adb_action(value)
-       if value == "Suspend" then
+function adb_action(name)
+       if name == "do_suspend" then
                luci.sys.call("/etc/init.d/adblock suspend >/dev/null 2>&1")
-       elseif value == "Resume" then
+       elseif name == "do_resume" then
                luci.sys.call("/etc/init.d/adblock resume >/dev/null 2>&1")
-       elseif value == "Refresh" then
+       elseif name == "do_refresh" then
                luci.sys.call("/etc/init.d/adblock reload >/dev/null 2>&1")
        end
        luci.http.prepare_content("text/plain")