aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2009-07-27 21:25:33 +0000
committerMelanie Thielker2009-07-27 21:25:33 +0000
commit3038efcc47f4025710ecd926007524374279292f (patch)
tree215c0c6db222ecbd5d255a9c68f211ff619f33d2 /OpenSim/Region
parentThis does NOT address the issue in mantis #3940, but it may avoid the excepti... (diff)
downloadopensim-SC_OLD-3038efcc47f4025710ecd926007524374279292f.zip
opensim-SC_OLD-3038efcc47f4025710ecd926007524374279292f.tar.gz
opensim-SC_OLD-3038efcc47f4025710ecd926007524374279292f.tar.bz2
opensim-SC_OLD-3038efcc47f4025710ecd926007524374279292f.tar.xz
Preserve the creator of items copied in inventory.
Fixes Mantis #3946
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index eb6f512..15009a3 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -706,13 +706,13 @@ namespace OpenSim.Region.Framework.Scenes
706 if (remoteClient.AgentId == oldAgentID) 706 if (remoteClient.AgentId == oldAgentID)
707 { 707 {
708 CreateNewInventoryItem( 708 CreateNewInventoryItem(
709 remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, 709 remoteClient, item.CreatorId, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
710 item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); 710 item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
711 } 711 }
712 else 712 else
713 { 713 {
714 CreateNewInventoryItem( 714 CreateNewInventoryItem(
715 remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, 715 remoteClient, item.CreatorId, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
716 item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch()); 716 item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
717 } 717 }
718 } 718 }
@@ -808,11 +808,11 @@ namespace OpenSim.Region.Framework.Scenes
808 /// <param name="asset"></param> 808 /// <param name="asset"></param>
809 /// <param name="invType"></param> 809 /// <param name="invType"></param>
810 /// <param name="nextOwnerMask"></param> 810 /// <param name="nextOwnerMask"></param>
811 private void CreateNewInventoryItem(IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID, 811 private void CreateNewInventoryItem(IClientAPI remoteClient, string creatorID, UUID folderID, string name, uint flags, uint callbackID,
812 AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate) 812 AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate)
813 { 813 {
814 CreateNewInventoryItem( 814 CreateNewInventoryItem(
815 remoteClient, folderID, name, flags, callbackID, asset, invType, 815 remoteClient, creatorID, folderID, name, flags, callbackID, asset, invType,
816 (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate); 816 (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate);
817 } 817 }
818 818
@@ -827,7 +827,7 @@ namespace OpenSim.Region.Framework.Scenes
827 /// <param name="nextOwnerMask"></param> 827 /// <param name="nextOwnerMask"></param>
828 /// <param name="creationDate"></param> 828 /// <param name="creationDate"></param>
829 private void CreateNewInventoryItem( 829 private void CreateNewInventoryItem(
830 IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, 830 IClientAPI remoteClient, string creatorID, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType,
831 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate) 831 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate)
832 { 832 {
833 CachedUserInfo userInfo 833 CachedUserInfo userInfo
@@ -837,7 +837,7 @@ namespace OpenSim.Region.Framework.Scenes
837 { 837 {
838 InventoryItemBase item = new InventoryItemBase(); 838 InventoryItemBase item = new InventoryItemBase();
839 item.Owner = remoteClient.AgentId; 839 item.Owner = remoteClient.AgentId;
840 item.CreatorId = remoteClient.AgentId.ToString(); 840 item.CreatorId = creatorID;
841 item.ID = UUID.Random(); 841 item.ID = UUID.Random();
842 item.AssetID = asset.FullID; 842 item.AssetID = asset.FullID;
843 item.Description = asset.Description; 843 item.Description = asset.Description;
@@ -913,7 +913,7 @@ namespace OpenSim.Region.Framework.Scenes
913 AssetBase asset = CreateAsset(name, description, assetType, data); 913 AssetBase asset = CreateAsset(name, description, assetType, data);
914 AssetService.Store(asset); 914 AssetService.Store(asset);
915 915
916 CreateNewInventoryItem(remoteClient, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); 916 CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
917 } 917 }
918 else 918 else
919 { 919 {