Don't post Link asset types back to the home grid

TeleportWork
Diva Canto 2013-07-21 15:46:00 -07:00
parent 76e46d0158
commit 7c1eb86c7d
3 changed files with 11 additions and 8 deletions

View File

@ -185,8 +185,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
} }
} }
public void UploadInventoryItem(UUID avatarID, UUID assetID, string name, int userlevel) public void UploadInventoryItem(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel)
{ {
if (type == AssetType.Link)
return;
string userAssetServer = string.Empty; string userAssetServer = string.Empty;
if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission) if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission)
{ {
@ -221,7 +224,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
{ {
UUID newAssetID = base.CapsUpdateInventoryItemAsset(remoteClient, itemID, data); UUID newAssetID = base.CapsUpdateInventoryItemAsset(remoteClient, itemID, data);
UploadInventoryItem(remoteClient.AgentId, newAssetID, "", 0); UploadInventoryItem(remoteClient.AgentId, AssetType.Unknown, newAssetID, "", 0);
return newAssetID; return newAssetID;
} }
@ -232,7 +235,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
protected override void ExportAsset(UUID agentID, UUID assetID) protected override void ExportAsset(UUID agentID, UUID assetID)
{ {
if (!assetID.Equals(UUID.Zero)) if (!assetID.Equals(UUID.Zero))
UploadInventoryItem(agentID, assetID, "", 0); UploadInventoryItem(agentID, AssetType.Unknown, assetID, "", 0);
else else
m_log.Debug("[HGScene]: Scene.Inventory did not create asset"); m_log.Debug("[HGScene]: Scene.Inventory did not create asset");
} }

View File

@ -742,7 +742,7 @@ namespace OpenSim.Region.Framework.Scenes
public event OnIncomingSceneObjectDelegate OnIncomingSceneObject; public event OnIncomingSceneObjectDelegate OnIncomingSceneObject;
public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so); public delegate void OnIncomingSceneObjectDelegate(SceneObjectGroup so);
public delegate void NewInventoryItemUploadComplete(UUID avatarID, UUID assetID, string name, int userlevel); public delegate void NewInventoryItemUploadComplete(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel);
public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete; public event NewInventoryItemUploadComplete OnNewInventoryItemUploadComplete;
@ -2146,7 +2146,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, UUID AssetID, String AssetName, int userlevel) public void TriggerOnNewInventoryItemUploadComplete(UUID agentID, AssetType type, UUID AssetID, String AssetName, int userlevel)
{ {
NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete; NewInventoryItemUploadComplete handlerNewInventoryItemUpdateComplete = OnNewInventoryItemUploadComplete;
if (handlerNewInventoryItemUpdateComplete != null) if (handlerNewInventoryItemUpdateComplete != null)
@ -2155,7 +2155,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
try try
{ {
d(agentID, AssetID, AssetName, userlevel); d(agentID, type, AssetID, AssetName, userlevel);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -139,7 +139,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
userlevel = 1; userlevel = 1;
} }
EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, item.AssetID, item.Name, userlevel); EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
return true; return true;
} }
@ -178,7 +178,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
userlevel = 1; userlevel = 1;
} }
EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, item.AssetID, item.Name, userlevel); EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
if (originalFolder != UUID.Zero) if (originalFolder != UUID.Zero)
{ {