Author: titmuss
Date: Mon Jan 28 14:14:10 2008
New Revision: 1663
URL: http://svn.slimdevices.com?rev=1663&root=Jive&view=rev
Log:
[EMAIL PROTECTED] (orig r1660): adrian | 2008-01-28 22:03:20 +0000
Bug: 6828
Description: support relative urls for applet and wallpaper download
to allow multihomed servers
Modified:
trunk/ (props changed)
trunk/jive/src/pkg/jive/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
trunk/jive/src/pkg/jive/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
Propchange: trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Mon Jan 28 14:14:10 2008
@@ -1,3 +1,3 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1659
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1660
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified:
trunk/jive/src/pkg/jive/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua?rev=1663&root=Jive&r1=1662&r2=1663&view=diff
==============================================================================
---
trunk/jive/src/pkg/jive/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
(original)
+++
trunk/jive/src/pkg/jive/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
Mon Jan 28 14:14:10 2008
@@ -108,21 +108,29 @@
self.todownload = {}
local installed = self:getSettings()
+ local ip, port = self.server:getIpPort()
for _,entry in pairs(data.item_loop) do
local version
local check = false
+ local url
+
+ if entry.relurl then
+ url = 'http://' .. ip .. ':' .. port .. entry.relurl
+ else
+ url = entry.url
+ end
if installed[entry.applet] then
version = installed[entry.applet] .. " > " ..
entry.version
if entry.version > installed[entry.applet] then
- self.todownload[entry.applet] = { url =
entry.url, ver = entry.version }
+ self.todownload[entry.applet] = { url = url,
ver = entry.version }
check = true
end
else
version = entry.version
- self.todownload[entry.applet] = { url = entry.url, ver
= entry.version }
+ self.todownload[entry.applet] = { url = url, ver =
entry.version }
check = true
end
@@ -131,7 +139,7 @@
icon = Checkbox("checkbox",
function(object, isSelected)
if isSelected then
- self.todownload[entry.applet] =
{ url = entry.url, ver = entry.version }
+ self.todownload[entry.applet] =
{ url = url, ver = entry.version }
else
self.todownload[entry.applet] =
nil
end
Modified:
trunk/jive/src/pkg/jive/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/applets/SetupWallpaper/SetupWallpaperApplet.lua?rev=1663&root=Jive&r1=1662&r2=1663&view=diff
==============================================================================
---
trunk/jive/src/pkg/jive/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
(original)
+++
trunk/jive/src/pkg/jive/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
Mon Jan 28 14:14:10 2008
@@ -191,6 +191,9 @@
function _serverSink(self, data)
+
+ local ip, port = self.server:getIpPort()
+
if data.item_loop then
for _,entry in pairs(data.item_loop) do
log:info("server wallpaper: ", entry.name)
@@ -216,7 +219,13 @@
self:_showBackground(entry.file, self.currentPlayer)
else
log:info("fetching: ", entry.file)
-
self:_fetchFile(entry.url, path, function() self:_showBackground(entry.file,
self.currentPlayer) end)
+
local url
+
if entry.relurl then
+
url = 'http://' .. ip .. ':' .. port .. entry.relurl
+
else
+
url = entry.url
+
end
+
self:_fetchFile(url, path, function() self:_showBackground(entry.file,
self.currentPlayer) end)
end
end
}
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins