* Adds CreatorID to asset metadata. This is just the plumbing to support CreatorID, it doesn't modify database backends or OAR files to support storing/loading it

This commit is contained in:
John Hurliman
2010-02-22 13:27:17 -08:00
parent 845a390e93
commit 7665aad002
34 changed files with 74 additions and 78 deletions

View File

@@ -90,7 +90,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
// HGAssetService dispatches it to the remote grid.
// It's not pretty, but the best that can be done while
// not having a global naming infrastructure
AssetBase asset1 = new AssetBase(asset.FullID, asset.Name, asset.Type);
AssetBase asset1 = new AssetBase(asset.FullID, asset.Name, asset.Type, asset.Metadata.CreatorID);
Copy(asset, asset1);
try
{

View File

@@ -161,7 +161,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
}
AssetBase asset =
CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data);
CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data, remoteClient.AgentId);
item.AssetID = asset.FullID;
m_Scene.AssetService.Store(asset);
@@ -339,7 +339,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
objectGroup.GetPartName(objectGroup.RootPart.LocalId),
objectGroup.GetPartDescription(objectGroup.RootPart.LocalId),
(sbyte)AssetType.Object,
Utils.StringToBytes(sceneObjectXml));
Utils.StringToBytes(sceneObjectXml),
objectGroup.OwnerID);
m_Scene.AssetService.Store(asset);
assetID = asset.FullID;
@@ -640,9 +641,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
/// <param name="assetType"></param>
/// <param name="data"></param>
/// <returns></returns>
private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data)
private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data, UUID creatorID)
{
AssetBase asset = new AssetBase(UUID.Random(), name, assetType);
AssetBase asset = new AssetBase(UUID.Random(), name, assetType, creatorID);
asset.Description = description;
asset.Data = (data == null) ? new byte[1] : data;