modules/admin-full: Use absolute paths for network configuration pages
authorSteven Barth <steven@midlink.org>
Wed, 20 Aug 2008 09:20:21 +0000 (09:20 +0000)
committerSteven Barth <steven@midlink.org>
Wed, 20 Aug 2008 09:20:21 +0000 (09:20 +0000)
modules/admin-full/luasrc/model/cbi/admin_network/network.lua

index 1f10ac8290dd50140de8b30c5871cff0febc5f29..3924e7c6cbd8849cb802771699fc40aab2cd7807 100644 (file)
@@ -27,7 +27,7 @@ local netstat = luci.sys.net.deviceinfo()
 
 s = m:section(TypedSection, "interface", "")
 s.addremove = true
-s.extedit   = luci.http.getenv("REQUEST_URI") .. "/%s"
+s.extedit   = luci.dispatcher.build_url("admin", "network", "network") .. "/%s"
 s.template  = "cbi/tblsection"
 
 function s.filter(self, section)
@@ -43,7 +43,8 @@ end
 function s.parse(self, ...)
        TypedSection.parse(self, ...)
        if created then
-               luci.http.redirect(luci.http.getenv("REQUEST_URI") .. "/" .. created)
+               luci.http.redirect(luci.dispatcher.build_url("admin", "network", "network")
+                .. "/" .. created)
        end
 end