aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorCharles Krinke2008-05-23 02:45:52 +0000
committerCharles Krinke2008-05-23 02:45:52 +0000
commit066b350d207f9410b2198726bdd71555b08c2d6d (patch)
treef81353b8431b0ea29d499f18b6a2457b097abd7d
parentThank you kindly, Melanie, for a patch which: (diff)
downloadopensim-SC_OLD-066b350d207f9410b2198726bdd71555b08c2d6d.zip
opensim-SC_OLD-066b350d207f9410b2198726bdd71555b08c2d6d.tar.gz
opensim-SC_OLD-066b350d207f9410b2198726bdd71555b08c2d6d.tar.bz2
opensim-SC_OLD-066b350d207f9410b2198726bdd71555b08c2d6d.tar.xz
Thank you kindly, Melanie, for:
Nothing huge, but the new button code for producing a new script does well, but the script will not allow for name change once created. It reverts back to new script.
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs73
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs5
6 files changed, 73 insertions, 35 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 109e70b..1a97499 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -566,7 +566,7 @@ namespace OpenSim.Framework
566 566
567 public delegate void RezScript(IClientAPI remoteClient, InventoryItemBase item, LLUUID transactionID, uint localID); 567 public delegate void RezScript(IClientAPI remoteClient, InventoryItemBase item, LLUUID transactionID, uint localID);
568 568
569 public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID); 569 public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID transactionID, TaskInventoryItem item, uint localID);
570 570
571 public delegate void MoveTaskInventory(IClientAPI remoteClient, LLUUID folderID, uint localID, LLUUID itemID); 571 public delegate void MoveTaskInventory(IClientAPI remoteClient, LLUUID folderID, uint localID, LLUUID itemID);
572 572
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index c23369c..93ce29e 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -5075,8 +5075,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5075 handlerUpdateTaskInventory = OnUpdateTaskInventory; 5075 handlerUpdateTaskInventory = OnUpdateTaskInventory;
5076 if (handlerUpdateTaskInventory != null) 5076 if (handlerUpdateTaskInventory != null)
5077 { 5077 {
5078 handlerUpdateTaskInventory(this, updatetask.InventoryData.ItemID, 5078 TaskInventoryItem newTaskItem=new TaskInventoryItem();
5079 updatetask.InventoryData.FolderID, updatetask.UpdateData.LocalID); 5079 newTaskItem.ItemID=updatetask.InventoryData.ItemID;
5080 newTaskItem.ParentID=updatetask.InventoryData.FolderID;
5081 newTaskItem.CreatorID=updatetask.InventoryData.CreatorID;
5082 newTaskItem.OwnerID=updatetask.InventoryData.OwnerID;
5083 newTaskItem.GroupID=updatetask.InventoryData.GroupID;
5084 newTaskItem.BaseMask=updatetask.InventoryData.BaseMask;
5085 newTaskItem.OwnerMask=updatetask.InventoryData.OwnerMask;
5086 newTaskItem.GroupMask=updatetask.InventoryData.GroupMask;
5087 newTaskItem.EveryoneMask=updatetask.InventoryData.EveryoneMask;
5088 newTaskItem.NextOwnerMask=updatetask.InventoryData.NextOwnerMask;
5089 //newTaskItem.GroupOwned=updatetask.InventoryData.GroupOwned;
5090 newTaskItem.Type=updatetask.InventoryData.Type;
5091 newTaskItem.InvType=updatetask.InventoryData.InvType;
5092 newTaskItem.Flags=updatetask.InventoryData.Flags;
5093 //newTaskItem.SaleType=updatetask.InventoryData.SaleType;
5094 //newTaskItem.SalePrice=updatetask.InventoryData.SalePrice;;
5095 newTaskItem.Name=Util.FieldToString(updatetask.InventoryData.Name);
5096 newTaskItem.Description=Util.FieldToString(updatetask.InventoryData.Description);
5097 newTaskItem.CreationDate=(uint)updatetask.InventoryData.CreationDate;
5098 handlerUpdateTaskInventory(this, updatetask.InventoryData.TransactionID,
5099 newTaskItem, updatetask.UpdateData.LocalID);
5080 } 5100 }
5081 } 5101 }
5082 } 5102 }
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index a319119..9dcb88c 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -301,13 +301,14 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
301 LLObject.ObjectFlags.ObjectMove | // tells client that you can move the object (only, no mod) 301 LLObject.ObjectFlags.ObjectMove | // tells client that you can move the object (only, no mod)
302 LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it 302 LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it
303 LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object 303 LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object
304 LLObject.ObjectFlags.ObjectOwnerModify | // Tells client that you're the owner of the object
304 LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set 305 LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set
305 ); 306 );
306 307
307 // Creating the three ObjectFlags options for this method to choose from. 308 // Creating the three ObjectFlags options for this method to choose from.
308 // Customize the OwnerMask 309 // Customize the OwnerMask
309 uint objectOwnerMask = ApplyObjectModifyMasks(task.OwnerMask, objflags); 310 uint objectOwnerMask = ApplyObjectModifyMasks(task.OwnerMask, objflags);
310 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectYouOwner; 311 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectYouOwner | (uint)LLObject.ObjectFlags.ObjectOwnerModify;
311 312
312 // Customize the GroupMask 313 // Customize the GroupMask
313 uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags); 314 uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags);
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 0e19d96..e92178c 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -897,53 +897,66 @@ namespace OpenSim.Region.Environment.Scenes
897 /// This method does not handle scripts, <see>RezScript(IClientAPI, LLUUID, unit)</see> 897 /// This method does not handle scripts, <see>RezScript(IClientAPI, LLUUID, unit)</see>
898 /// </summary> 898 /// </summary>
899 /// <param name="remoteClient"></param> 899 /// <param name="remoteClient"></param>
900 /// <param name="itemID"></param> 900 /// <param name="transactionID"></param>
901 /// <param name="folderID"></param> 901 /// <param name="itemInfo"></param>
902 /// <param name="primLocalID"></param> 902 /// <param name="primLocalID"></param>
903 public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, 903 public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID transactionID, TaskInventoryItem itemInfo,
904 uint primLocalID) 904 uint primLocalID)
905 { 905 {
906 LLUUID itemID=itemInfo.ItemID;
907 LLUUID folderID=itemInfo.ParentID;
908
909 // Find the prim we're dealing with
906 SceneObjectPart part = GetSceneObjectPart(primLocalID); 910 SceneObjectPart part = GetSceneObjectPart(primLocalID);
907 911
908 if (part != null) 912 if (part != null)
909 { 913 {
910 LLUUID copyID = LLUUID.Random(); 914 TaskInventoryItem currentItem=part.GetInventoryItem(itemID);
911 if (itemID != LLUUID.Zero) 915 if(currentItem == null)
912 { 916 {
913 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 917 LLUUID copyID = LLUUID.Random();
914 918 if (itemID != LLUUID.Zero)
915 if (userInfo != null && userInfo.RootFolder != null)
916 { 919 {
917 InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); 920 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
918 921
919 // Try library 922 if (userInfo != null && userInfo.RootFolder != null)
920 // XXX clumsy, possibly should be one call
921 if (null == item)
922 { 923 {
923 item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID); 924 InventoryItemBase item = userInfo.RootFolder.FindItem(itemID);
924 }
925 925
926 if (item != null) 926 // Try library
927 { 927 // XXX clumsy, possibly should be one call
928 part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID); 928 if (null == item)
929 m_log.InfoFormat(
930 "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}",
931 item.Name, primLocalID, remoteClient.Name);
932 part.GetProperties(remoteClient);
933 if (!ExternalChecks.ExternalChecksBypassPermissions())
934 { 929 {
935 if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) 930 item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID);
936 RemoveInventoryItem(remoteClient, itemID); 931 }
932
933 if (item != null)
934 {
935 part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID);
936 m_log.InfoFormat(
937 "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}",
938 item.Name, primLocalID, remoteClient.Name);
939 part.GetProperties(remoteClient);
940 if (!ExternalChecks.ExternalChecksBypassPermissions())
941 {
942 if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
943 RemoveInventoryItem(remoteClient, itemID);
944 }
945 }
946 else
947 {
948 m_log.ErrorFormat(
949 "[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!",
950 itemID, remoteClient.Name);
937 } 951 }
938 }
939 else
940 {
941 m_log.ErrorFormat(
942 "[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!",
943 itemID, remoteClient.Name);
944 } 952 }
945 } 953 }
946 } 954 }
955 else // Updating existing item with new perms etc
956 {
957 if(part.UpdateInventoryItem(itemInfo))
958 part.GetProperties(remoteClient);
959 }
947 } 960 }
948 else 961 else
949 { 962 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
index 040ee70..2be5ab9 100644
--- a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs
@@ -69,6 +69,7 @@ namespace OpenSim.Region.Environment.Scenes
69 (uint)LLObject.ObjectFlags.ObjectMove | 69 (uint)LLObject.ObjectFlags.ObjectMove |
70 (uint)LLObject.ObjectFlags.ObjectTransfer | 70 (uint)LLObject.ObjectFlags.ObjectTransfer |
71 (uint)LLObject.ObjectFlags.ObjectYouOwner | 71 (uint)LLObject.ObjectFlags.ObjectYouOwner |
72 (uint)LLObject.ObjectFlags.ObjectOwnerModify |
72 (uint)LLObject.ObjectFlags.ObjectYouOfficer; 73 (uint)LLObject.ObjectFlags.ObjectYouOfficer;
73 74
74 foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions) 75 foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 51521ff..facf72d 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -286,7 +286,6 @@ namespace OpenSim.Region.Environment.Scenes
286 public void AddInventoryItem(TaskInventoryItem item) 286 public void AddInventoryItem(TaskInventoryItem item)
287 { 287 {
288 item.ParentID = UUID; 288 item.ParentID = UUID;
289 item.CreationDate = 1000;
290 item.ParentPartID = UUID; 289 item.ParentPartID = UUID;
291 290
292 string name=FindAvailableInventoryName(item.Name); 291 string name=FindAvailableInventoryName(item.Name);
@@ -369,6 +368,10 @@ namespace OpenSim.Region.Environment.Scenes
369 { 368 {
370 if (m_taskInventory.ContainsKey(item.ItemID)) 369 if (m_taskInventory.ContainsKey(item.ItemID))
371 { 370 {
371 item.ParentID = UUID;
372 item.ParentPartID = UUID;
373 item.Flags=m_taskInventory[item.ItemID].Flags;
374
372 m_taskInventory[item.ItemID] = item; 375 m_taskInventory[item.ItemID] = item;
373 m_inventorySerial++; 376 m_inventorySerial++;
374 TriggerScriptChangedEvent(Changed.INVENTORY); 377 TriggerScriptChangedEvent(Changed.INVENTORY);