aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs29
3 files changed, 25 insertions, 10 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index b969a8d..f34b9c4 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -198,7 +198,7 @@ namespace OpenSim.Framework
198 198
199 public delegate void CreateNewInventoryItem( 199 public delegate void CreateNewInventoryItem(
200 IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, 200 IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name,
201 sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask); 201 sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask, int creationDate);
202 202
203 public delegate void FetchInventoryDescendents( 203 public delegate void FetchInventoryDescendents(
204 IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder); 204 IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index fa3d9e1..e8a54bf 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1762,6 +1762,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1762 InventoryReply.InventoryData[0].Flags = Item.Flags; 1762 InventoryReply.InventoryData[0].Flags = Item.Flags;
1763 InventoryReply.InventoryData[0].SalePrice = Item.SalePrice; 1763 InventoryReply.InventoryData[0].SalePrice = Item.SalePrice;
1764 InventoryReply.InventoryData[0].SaleType = Item.SaleType; 1764 InventoryReply.InventoryData[0].SaleType = Item.SaleType;
1765 InventoryReply.InventoryData[0].CreationDate = Item.CreationDate;
1765 1766
1766 InventoryReply.InventoryData[0].CRC = 1767 InventoryReply.InventoryData[0].CRC =
1767 Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, 1768 Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType,
@@ -5288,7 +5289,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5288 createItem.InventoryBlock.InvType, 5289 createItem.InventoryBlock.InvType,
5289 createItem.InventoryBlock.Type, 5290 createItem.InventoryBlock.Type,
5290 createItem.InventoryBlock.WearableType, 5291 createItem.InventoryBlock.WearableType,
5291 createItem.InventoryBlock.NextOwnerMask); 5292 createItem.InventoryBlock.NextOwnerMask,
5293 Util.UnixTimeSinceEpoch());
5292 } 5294 }
5293 break; 5295 break;
5294 case PacketType.FetchInventory: 5296 case PacketType.FetchInventory:
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 704ca5d..5ab7731 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -330,6 +330,13 @@ namespace OpenSim.Region.Environment.Scenes
330 //item.GroupID = itemUpd.GroupID; 330 //item.GroupID = itemUpd.GroupID;
331 //item.GroupOwned = itemUpd.GroupOwned; 331 //item.GroupOwned = itemUpd.GroupOwned;
332 //item.CreationDate = itemUpd.CreationDate; 332 //item.CreationDate = itemUpd.CreationDate;
333 // The client sends zero if its newly created?
334
335 if (itemUpd.CreationDate == 0)
336 item.CreationDate = Util.UnixTimeSinceEpoch();
337 else
338 item.CreationDate = itemUpd.CreationDate;
339
333 340
334 // TODO: Check if folder changed and move item 341 // TODO: Check if folder changed and move item
335 //item.NextPermissions = itemUpd.Folder; 342 //item.NextPermissions = itemUpd.Folder;
@@ -448,6 +455,8 @@ namespace OpenSim.Region.Environment.Scenes
448 itemCopy.SalePrice = item.SalePrice; 455 itemCopy.SalePrice = item.SalePrice;
449 itemCopy.SaleType = item.SaleType; 456 itemCopy.SaleType = item.SaleType;
450 457
458 itemCopy.CreationDate = item.CreationDate;
459
451 recipientUserInfo.AddItem(itemCopy); 460 recipientUserInfo.AddItem(itemCopy);
452 461
453 if (!ExternalChecks.ExternalChecksBypassPermissions()) 462 if (!ExternalChecks.ExternalChecksBypassPermissions())
@@ -532,13 +541,13 @@ namespace OpenSim.Region.Environment.Scenes
532 { 541 {
533 CreateNewInventoryItem( 542 CreateNewInventoryItem(
534 remoteClient, newFolderID, item.Name, item.Flags, callbackID, asset, (sbyte)item.InvType, 543 remoteClient, newFolderID, item.Name, item.Flags, callbackID, asset, (sbyte)item.InvType,
535 item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions); 544 item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, Util.UnixTimeSinceEpoch());
536 } 545 }
537 else 546 else
538 { 547 {
539 CreateNewInventoryItem( 548 CreateNewInventoryItem(
540 remoteClient, newFolderID, item.Name, item.Flags, callbackID, asset, (sbyte)item.InvType, 549 remoteClient, newFolderID, item.Name, item.Flags, callbackID, asset, (sbyte)item.InvType,
541 item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions); 550 item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, Util.UnixTimeSinceEpoch());
542 } 551 }
543 } 552 }
544 else 553 else
@@ -634,15 +643,15 @@ namespace OpenSim.Region.Environment.Scenes
634 /// <param name="invType"></param> 643 /// <param name="invType"></param>
635 /// <param name="nextOwnerMask"></param> 644 /// <param name="nextOwnerMask"></param>
636 private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, string name, uint flags, uint callbackID, 645 private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, string name, uint flags, uint callbackID,
637 AssetBase asset, sbyte invType, uint nextOwnerMask) 646 AssetBase asset, sbyte invType, uint nextOwnerMask, int creationDate)
638 { 647 {
639 CreateNewInventoryItem( 648 CreateNewInventoryItem(
640 remoteClient, folderID, name, flags, callbackID, asset, invType, 649 remoteClient, folderID, name, flags, callbackID, asset, invType,
641 (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask); 650 (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, creationDate);
642 } 651 }
643 652
644 /// <summary> 653 /// <summary>
645 /// Create a new inventory item. 654 /// Create a new Inventory Item
646 /// </summary> 655 /// </summary>
647 /// <param name="remoteClient"></param> 656 /// <param name="remoteClient"></param>
648 /// <param name="folderID"></param> 657 /// <param name="folderID"></param>
@@ -650,9 +659,10 @@ namespace OpenSim.Region.Environment.Scenes
650 /// <param name="asset"></param> 659 /// <param name="asset"></param>
651 /// <param name="invType"></param> 660 /// <param name="invType"></param>
652 /// <param name="nextOwnerMask"></param> 661 /// <param name="nextOwnerMask"></param>
662 /// <param name="creationDate"></param>
653 private void CreateNewInventoryItem( 663 private void CreateNewInventoryItem(
654 IClientAPI remoteClient, LLUUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, 664 IClientAPI remoteClient, LLUUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType,
655 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask) 665 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, int creationDate)
656 { 666 {
657 CachedUserInfo userInfo 667 CachedUserInfo userInfo
658 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 668 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -674,6 +684,7 @@ namespace OpenSim.Region.Environment.Scenes
674 item.NextPermissions = nextOwnerMask; 684 item.NextPermissions = nextOwnerMask;
675 item.EveryOnePermissions = everyoneMask; 685 item.EveryOnePermissions = everyoneMask;
676 item.BasePermissions = baseMask; 686 item.BasePermissions = baseMask;
687 item.CreationDate = creationDate;
677 688
678 userInfo.AddItem(item); 689 userInfo.AddItem(item);
679 remoteClient.SendInventoryItemCreateUpdate(item); 690 remoteClient.SendInventoryItemCreateUpdate(item);
@@ -703,7 +714,7 @@ namespace OpenSim.Region.Environment.Scenes
703 public void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 714 public void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID,
704 uint callbackID, string description, string name, sbyte invType, 715 uint callbackID, string description, string name, sbyte invType,
705 sbyte assetType, 716 sbyte assetType,
706 byte wearableType, uint nextOwnerMask) 717 byte wearableType, uint nextOwnerMask, int creationDate)
707 { 718 {
708// m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID); 719// m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID);
709 720
@@ -730,7 +741,7 @@ namespace OpenSim.Region.Environment.Scenes
730 AssetBase asset = CreateAsset(name, description, assetType, data); 741 AssetBase asset = CreateAsset(name, description, assetType, data);
731 AssetCache.AddAsset(asset); 742 AssetCache.AddAsset(asset);
732 743
733 CreateNewInventoryItem(remoteClient, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask); 744 CreateNewInventoryItem(remoteClient, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
734 } 745 }
735 else 746 else
736 { 747 {
@@ -1664,6 +1675,7 @@ namespace OpenSim.Region.Environment.Scenes
1664 } 1675 }
1665 1676
1666 // TODO: add the new fields (Flags, Sale info, etc) 1677 // TODO: add the new fields (Flags, Sale info, etc)
1678 item.CreationDate = Util.UnixTimeSinceEpoch();
1667 1679
1668 userInfo.AddItem(item); 1680 userInfo.AddItem(item);
1669 if (item.Owner == remoteClient.AgentId) 1681 if (item.Owner == remoteClient.AgentId)
@@ -1817,6 +1829,7 @@ namespace OpenSim.Region.Environment.Scenes
1817 item.NextPermissions = objectGroup.RootPart.NextOwnerMask; 1829 item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
1818 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; 1830 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask;
1819 } 1831 }
1832 item.CreationDate = Util.UnixTimeSinceEpoch();
1820 1833
1821 userInfo.AddItem(item); 1834 userInfo.AddItem(item);
1822 remoteClient.SendInventoryItemCreateUpdate(item); 1835 remoteClient.SendInventoryItemCreateUpdate(item);