applications/luci-transmission: fix link to transmission gui if uhttpd runs on a...
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 29 Oct 2012 12:56:58 +0000 (12:56 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 29 Oct 2012 12:56:58 +0000 (12:56 +0000)
applications/luci-transmission/luasrc/model/cbi/transmission.lua

index e727a0d..4f9e3c5 100644 (file)
@@ -22,7 +22,7 @@ local running = (luci.sys.call("pidof transmission-daemon > /dev/null") == 0)
 local webinstalled = luci.model.ipkg.installed("transmission-web") 
 local button = ""
 if running and webinstalled then
-       button = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"button\" value=\" " .. translate("Open Web Interface") .. " \" onclick=\"window.open('http://'+window.location.host+':" .. trport .. "')\"/>"
+       button = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"button\" value=\" " .. translate("Open Web Interface") .. " \" onclick=\"window.open('http://'+window.location.hostname+':" .. trport .. "')\"/>"
 end
 
 m = Map("transmission", "Transmission", translate("Transmission daemon is a simple bittorrent client, here you can configure the settings.") .. button)