* Make it possible to store creator strings in user inventory items as well as UUIDs
* All existing functionality should be unaffected. * Database schemas have not been changed.0.6.5-rc1
parent
8d8c45b659
commit
f3c7298fc5
|
@ -1293,7 +1293,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
rdata.writer.WriteAttributeString("uuid", String.Empty, i.ID.ToString());
|
||||
rdata.writer.WriteAttributeString("folder", String.Empty, i.Folder.ToString());
|
||||
rdata.writer.WriteAttributeString("owner", String.Empty, i.Owner.ToString());
|
||||
rdata.writer.WriteAttributeString("creator", String.Empty, i.Creator.ToString());
|
||||
rdata.writer.WriteAttributeString("creator", String.Empty, i.CreatorId);
|
||||
rdata.writer.WriteAttributeString("creationdate", String.Empty, i.CreationDate.ToString());
|
||||
rdata.writer.WriteAttributeString("invtype", String.Empty, i.InvType.ToString());
|
||||
rdata.writer.WriteAttributeString("assettype", String.Empty, i.AssetType.ToString());
|
||||
|
@ -1392,7 +1392,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|| newf.Folder != oldf.Folder
|
||||
|| newf.Description != oldf.Description
|
||||
|| newf.Owner != oldf.Owner
|
||||
|| newf.Creator != oldf.Creator
|
||||
|| newf.CreatorId != oldf.CreatorId
|
||||
|| newf.AssetID != oldf.AssetID
|
||||
|| newf.GroupID != oldf.GroupID
|
||||
|| newf.GroupOwned != oldf.GroupOwned
|
||||
|
@ -1676,7 +1676,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
result.ID = UUID.Zero;
|
||||
result.Folder = UUID.Zero;
|
||||
result.Owner = ic.UserID;
|
||||
result.Creator = ic.UserID;
|
||||
result.CreatorId = ic.UserID.ToString();
|
||||
result.AssetID = UUID.Zero;
|
||||
result.GroupID = UUID.Zero;
|
||||
result.GroupOwned = false;
|
||||
|
@ -1710,7 +1710,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
result.InvType = Int32.Parse(ic.xml.Value);
|
||||
break;
|
||||
case "creator":
|
||||
result.Creator = new UUID(ic.xml.Value);
|
||||
result.CreatorId = ic.xml.Value;
|
||||
break;
|
||||
case "assettype":
|
||||
result.AssetType = Int32.Parse(ic.xml.Value);
|
||||
|
|
|
@ -181,7 +181,7 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
}
|
||||
}
|
||||
m_log.InfoFormat("[INVENTORY DB] : FOund no inventory folder with ID : {0}", folderID);
|
||||
m_log.InfoFormat("[INVENTORY DB] : Found no inventory folder with ID : {0}", folderID);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message);
|
||||
m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message);
|
||||
m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[ASSET DB] Error : {0}", e.Message);
|
||||
m_log.ErrorFormat("[INVENTORY DB]: Error : {0}", e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -385,7 +385,8 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
}
|
||||
}
|
||||
m_log.InfoFormat("[INVENTORY DB] : Found no inventory item with ID : {0}", itemID);
|
||||
|
||||
m_log.InfoFormat("[INVENTORY DB]: Found no inventory item with ID : {0}", itemID);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -424,7 +425,7 @@ namespace OpenSim.Data.MSSQL
|
|||
command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions));
|
||||
command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions));
|
||||
command.Parameters.Add(database.CreateParameter("invType", item.InvType));
|
||||
command.Parameters.Add(database.CreateParameter("creatorID", item.Creator));
|
||||
command.Parameters.Add(database.CreateParameter("creatorID", item.CreatorId));
|
||||
command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions));
|
||||
command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions));
|
||||
command.Parameters.Add(database.CreateParameter("inventoryGroupPermissions", item.GroupPermissions));
|
||||
|
@ -441,7 +442,7 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[INVENTORY DB] Error inserting item :" + e.Message);
|
||||
m_log.Error("[INVENTORY DB]: Error inserting item :" + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -498,7 +499,7 @@ namespace OpenSim.Data.MSSQL
|
|||
command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions));
|
||||
command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions));
|
||||
command.Parameters.Add(database.CreateParameter("invType", item.InvType));
|
||||
command.Parameters.Add(database.CreateParameter("creatorID", item.Creator));
|
||||
command.Parameters.Add(database.CreateParameter("creatorID", item.CreatorIdAsUuid));
|
||||
command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions));
|
||||
command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions));
|
||||
command.Parameters.Add(database.CreateParameter("salePrice", item.SalePrice));
|
||||
|
@ -515,7 +516,7 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[INVENTORY DB] Error updating item :" + e.Message);
|
||||
m_log.Error("[INVENTORY DB]: Error updating item :" + e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -538,7 +539,7 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error("[INVENTORY DB] Error deleting item :" + e.Message);
|
||||
m_log.Error("[INVENTORY DB]: Error deleting item :" + e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -725,7 +726,7 @@ namespace OpenSim.Data.MSSQL
|
|||
item.NextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]);
|
||||
item.CurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]);
|
||||
item.InvType = Convert.ToInt32(reader["invType"].ToString());
|
||||
item.Creator = new UUID((Guid)reader["creatorID"]);
|
||||
item.CreatorId = ((Guid)reader["creatorID"]).ToString();
|
||||
item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]);
|
||||
item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]);
|
||||
item.GroupPermissions = Convert.ToUInt32(reader["inventoryGroupPermissions"]);
|
||||
|
@ -740,7 +741,7 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
catch (SqlException e)
|
||||
{
|
||||
m_log.Error("[INVENTORY DB] Error reading inventory item :" + e.Message);
|
||||
m_log.Error("[INVENTORY DB]: Error reading inventory item :" + e.Message);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -764,7 +765,7 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
catch (SqlException e)
|
||||
{
|
||||
m_log.Error("[INVENTORY DB] Error deleting folder :" + e.Message);
|
||||
m_log.Error("[INVENTORY DB]: Error deleting folder :" + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -306,22 +306,20 @@ namespace OpenSim.Data.MySQL
|
|||
try
|
||||
{
|
||||
InventoryItemBase item = new InventoryItemBase();
|
||||
item.CreatorId = (string)reader["creatorID"];
|
||||
|
||||
// Be a bit safer in parsing these because the
|
||||
// database doesn't enforce them to be not null, and
|
||||
// the inventory still works if these are weird in the
|
||||
// db
|
||||
|
||||
UUID Owner = UUID.Zero;
|
||||
UUID Creator = UUID.Zero;
|
||||
UUID GroupID = UUID.Zero;
|
||||
UUID.TryParse((string)reader["avatarID"], out Owner);
|
||||
UUID.TryParse((string)reader["creatorID"], out Creator);
|
||||
UUID.TryParse((string)reader["groupID"], out GroupID);
|
||||
item.Owner = Owner;
|
||||
item.Creator = Creator;
|
||||
item.Owner = Owner;
|
||||
item.GroupID = GroupID;
|
||||
|
||||
// Rest of the parsing. If these UUID's fail, we're dead anyway
|
||||
// Rest of the parsing. If these UUID's fail, we're dead anyway
|
||||
item.ID = new UUID((string) reader["inventoryID"]);
|
||||
item.AssetID = new UUID((string) reader["assetID"]);
|
||||
item.AssetType = (int) reader["assetType"];
|
||||
|
@ -480,7 +478,7 @@ namespace OpenSim.Data.MySQL
|
|||
result.Parameters.AddWithValue("?inventoryCurrentPermissions",
|
||||
item.CurrentPermissions.ToString());
|
||||
result.Parameters.AddWithValue("?invType", item.InvType);
|
||||
result.Parameters.AddWithValue("?creatorID", item.Creator.ToString());
|
||||
result.Parameters.AddWithValue("?creatorID", item.CreatorId);
|
||||
result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions);
|
||||
result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions);
|
||||
result.Parameters.AddWithValue("?inventoryGroupPermissions", item.GroupPermissions);
|
||||
|
|
|
@ -143,7 +143,7 @@ namespace OpenSim.Data.SQLite
|
|||
item.InvType = Convert.ToInt32(row["invType"]);
|
||||
item.Folder = new UUID((string) row["parentFolderID"]);
|
||||
item.Owner = new UUID((string) row["avatarID"]);
|
||||
item.Creator = new UUID((string) row["creatorsID"]);
|
||||
item.CreatorId = (string)row["creatorsID"];
|
||||
item.Name = (string) row["inventoryName"];
|
||||
item.Description = (string) row["inventoryDescription"];
|
||||
|
||||
|
@ -176,7 +176,7 @@ namespace OpenSim.Data.SQLite
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Fill a database row with item data
|
||||
/// </summary>
|
||||
/// <param name="row"></param>
|
||||
/// <param name="item"></param>
|
||||
|
@ -188,7 +188,7 @@ namespace OpenSim.Data.SQLite
|
|||
row["invType"] = item.InvType;
|
||||
row["parentFolderID"] = Util.ToRawUuidString(item.Folder);
|
||||
row["avatarID"] = Util.ToRawUuidString(item.Owner);
|
||||
row["creatorsID"] = Util.ToRawUuidString(item.Creator);
|
||||
row["creatorsID"] = Util.ToRawUuidString(item.CreatorIdAsUuid);
|
||||
row["inventoryName"] = item.Name;
|
||||
row["inventoryDescription"] = item.Description;
|
||||
|
||||
|
@ -281,7 +281,7 @@ namespace OpenSim.Data.SQLite
|
|||
DataRow inventoryRow = inventoryItemTable.Rows.Find(Util.ToRawUuidString(item.ID));
|
||||
if (inventoryRow == null)
|
||||
{
|
||||
if (! add)
|
||||
if (!add)
|
||||
m_log.ErrorFormat("[INVENTORY DB]: Interface Misuse: Attempting to Update non-existant inventory item: {0}", item.ID);
|
||||
|
||||
inventoryRow = inventoryItemTable.NewRow();
|
||||
|
|
|
@ -271,7 +271,7 @@ namespace OpenSim.Data.Tests
|
|||
i.ID = id;
|
||||
i.Folder = parent;
|
||||
i.Owner = owner;
|
||||
i.Creator = owner;
|
||||
i.CreatorId = owner.ToString();
|
||||
i.Name = name;
|
||||
i.Description = name;
|
||||
i.AssetID = asset;
|
||||
|
|
|
@ -606,7 +606,7 @@ namespace OpenSim.Data.Tests
|
|||
UUID owner = UUID.Random();
|
||||
i.Owner = owner;
|
||||
UUID creator = UUID.Random();
|
||||
i.Creator = creator;
|
||||
i.CreatorId = creator.ToString();
|
||||
string name = RandomName();
|
||||
i.Name = name;
|
||||
i.Description = name;
|
||||
|
@ -982,7 +982,7 @@ namespace OpenSim.Data.Tests
|
|||
i.ID = id;
|
||||
i.Folder = parent;
|
||||
i.Owner = owner;
|
||||
i.Creator = owner;
|
||||
i.CreatorId = owner.ToString();
|
||||
i.Name = name;
|
||||
i.Description = name;
|
||||
i.AssetID = asset;
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
InventoryItemBase item = new InventoryItemBase();
|
||||
item.Owner = libOwner;
|
||||
item.Creator = libOwner;
|
||||
item.CreatorId = libOwner.ToString();
|
||||
item.ID = inventoryID;
|
||||
item.AssetID = assetID;
|
||||
item.Description = description;
|
||||
|
@ -159,7 +159,7 @@ namespace OpenSim.Framework.Communications.Cache
|
|||
{
|
||||
InventoryItemBase item = new InventoryItemBase();
|
||||
item.Owner = libOwner;
|
||||
item.Creator = libOwner;
|
||||
item.CreatorId = libOwner.ToString();
|
||||
item.ID = new UUID(config.GetString("inventoryID", ID.ToString()));
|
||||
item.AssetID = new UUID(config.GetString("assetID", item.ID.ToString()));
|
||||
item.Folder = new UUID(config.GetString("folderID", ID.ToString()));
|
||||
|
|
|
@ -440,7 +440,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
|||
llsdItem.type = Enum.GetName(typeof(AssetType), invItem.AssetType).ToLower();
|
||||
llsdItem.inv_type = Enum.GetName(typeof(InventoryType), invItem.InvType).ToLower();
|
||||
llsdItem.permissions = new LLSDPermissions();
|
||||
llsdItem.permissions.creator_id = invItem.Creator;
|
||||
llsdItem.permissions.creator_id = invItem.CreatorIdAsUuid;
|
||||
llsdItem.permissions.base_mask = (int)invItem.CurrentPermissions;
|
||||
llsdItem.permissions.everyone_mask = (int)invItem.EveryOnePermissions;
|
||||
llsdItem.permissions.group_id = UUID.Zero;
|
||||
|
@ -789,7 +789,7 @@ namespace OpenSim.Framework.Communications.Capabilities
|
|||
|
||||
InventoryItemBase item = new InventoryItemBase();
|
||||
item.Owner = m_agentID;
|
||||
item.Creator = m_agentID;
|
||||
item.CreatorId = m_agentID.ToString();
|
||||
item.ID = inventoryItem;
|
||||
item.AssetID = asset.FullID;
|
||||
item.Description = assetDescription;
|
||||
|
|
|
@ -53,8 +53,16 @@ namespace OpenSim.Framework
|
|||
/// <summary>
|
||||
/// The creator of this item
|
||||
/// </summary>
|
||||
private UUID _creator;
|
||||
private string m_creatorId = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The creator of this item expressed as a UUID
|
||||
/// </summary>
|
||||
private UUID m_creatorIdAsUuid = UUID.Zero;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private uint _nextPermissions;
|
||||
|
||||
/// <summary>
|
||||
|
@ -129,10 +137,27 @@ namespace OpenSim.Framework
|
|||
set { _folder = value; }
|
||||
}
|
||||
|
||||
public UUID Creator
|
||||
/// <value>
|
||||
/// The creator ID
|
||||
/// </value>
|
||||
public string CreatorId
|
||||
{
|
||||
get { return _creator; }
|
||||
set { _creator = value; }
|
||||
get { return m_creatorId; }
|
||||
set
|
||||
{
|
||||
m_creatorId = value;
|
||||
|
||||
// For now, all IDs are UUIDs
|
||||
UUID.TryParse(m_creatorId, out m_creatorIdAsUuid);
|
||||
}
|
||||
}
|
||||
|
||||
/// <value>
|
||||
/// The creator ID expressed as a UUID
|
||||
/// </value>
|
||||
public UUID CreatorIdAsUuid
|
||||
{
|
||||
get { return m_creatorIdAsUuid; }
|
||||
}
|
||||
|
||||
public string Description
|
||||
|
|
|
@ -216,7 +216,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins
|
|||
writer.WriteString(item.InvType.ToString());
|
||||
writer.WriteEndElement();
|
||||
writer.WriteStartElement("CreatorUUID");
|
||||
writer.WriteString(item.Creator.ToString());
|
||||
writer.WriteString(item.CreatorId);
|
||||
writer.WriteEndElement();
|
||||
writer.WriteStartElement("CreationDate");
|
||||
writer.WriteString(item.CreationDate.ToString());
|
||||
|
|
|
@ -598,7 +598,6 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
|
|||
{
|
||||
InventoryItemBase item = new InventoryItemBase();
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
using (XmlReader reader = XmlReader.Create(stream))
|
||||
|
@ -624,9 +623,8 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
|
|||
|
||||
ReadUUID(reader, "Folder", out dummyUUID);
|
||||
item.Folder = dummyUUID;
|
||||
ReadUUID(reader, "Creator", out dummyUUID);
|
||||
item.Creator = dummyUUID;
|
||||
|
||||
item.CreatorId = reader.ReadElementContentAsString("Creator", String.Empty);
|
||||
item.Description = reader.ReadElementContentAsString("Description", String.Empty);
|
||||
|
||||
uint dummyUInt;
|
||||
|
@ -757,7 +755,7 @@ namespace OpenSim.Grid.AssetInventoryServer.Plugins.OpenSim
|
|||
writer.WriteElementString("InvType", XmlConvert.ToString(item.InvType));
|
||||
WriteUUID(writer, "Folder", item.Folder);
|
||||
WriteUUID(writer, "Owner", item.Owner);
|
||||
WriteUUID(writer, "Creator", item.Creator);
|
||||
writer.WriteElementString("Creator", item.CreatorId);
|
||||
writer.WriteElementString("Name", item.Name);
|
||||
writer.WriteElementString("Description", item.Description);
|
||||
writer.WriteElementString("NextPermissions", XmlConvert.ToString(item.NextPermissions));
|
||||
|
|
|
@ -515,7 +515,7 @@ namespace OpenSim.Grid.AssetInventoryServer
|
|||
else if (Reader.LocalName == "Creator" && Reader.NamespaceURI == "" && !b13)
|
||||
{
|
||||
b13 = true;
|
||||
ob.@Creator = ReadObject_UUID(false, true);
|
||||
ob.@CreatorId = Reader.ReadElementString();
|
||||
}
|
||||
else if (Reader.LocalName == "Owner" && Reader.NamespaceURI == "" && !b12)
|
||||
{
|
||||
|
@ -876,7 +876,7 @@ namespace OpenSim.Grid.AssetInventoryServer
|
|||
WriteElementString("InvType", "", ob.@InvType.ToString(CultureInfo.InvariantCulture));
|
||||
WriteObject_UUID(ob.@Folder, "Folder", "", false, false, true);
|
||||
WriteObject_UUID(ob.@Owner, "Owner", "", false, false, true);
|
||||
WriteObject_UUID(ob.@Creator, "Creator", "", false, false, true);
|
||||
WriteElementString("Creator", "", ob.@CreatorId);
|
||||
WriteElementString("Name", "", ob.@Name);
|
||||
WriteElementString("Description", "", ob.@Description);
|
||||
WriteElementString("NextPermissions", "", ob.@NextPermissions.ToString(CultureInfo.InvariantCulture));
|
||||
|
|
|
@ -1729,7 +1729,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
descend.ItemData[i] = new InventoryDescendentsPacket.ItemDataBlock();
|
||||
descend.ItemData[i].ItemID = item.ID;
|
||||
descend.ItemData[i].AssetID = item.AssetID;
|
||||
descend.ItemData[i].CreatorID = item.Creator;
|
||||
descend.ItemData[i].CreatorID = item.CreatorIdAsUuid;
|
||||
descend.ItemData[i].BaseMask = item.BasePermissions;
|
||||
descend.ItemData[i].Description = LLUtil.StringToPacketBytes(item.Description);
|
||||
descend.ItemData[i].EveryoneMask = item.EveryOnePermissions;
|
||||
|
@ -1928,7 +1928,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
inventoryReply.InventoryData[0] = new FetchInventoryReplyPacket.InventoryDataBlock();
|
||||
inventoryReply.InventoryData[0].ItemID = item.ID;
|
||||
inventoryReply.InventoryData[0].AssetID = item.AssetID;
|
||||
inventoryReply.InventoryData[0].CreatorID = item.Creator;
|
||||
inventoryReply.InventoryData[0].CreatorID = item.CreatorIdAsUuid;
|
||||
inventoryReply.InventoryData[0].BaseMask = item.BasePermissions;
|
||||
inventoryReply.InventoryData[0].CreationDate = item.CreationDate;
|
||||
|
||||
|
@ -1950,13 +1950,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
inventoryReply.InventoryData[0].SaleType = item.SaleType;
|
||||
|
||||
inventoryReply.InventoryData[0].CRC =
|
||||
Helpers.InventoryCRC(1000, 0, inventoryReply.InventoryData[0].InvType,
|
||||
inventoryReply.InventoryData[0].Type, inventoryReply.InventoryData[0].AssetID,
|
||||
inventoryReply.InventoryData[0].GroupID, 100,
|
||||
inventoryReply.InventoryData[0].OwnerID, inventoryReply.InventoryData[0].CreatorID,
|
||||
inventoryReply.InventoryData[0].ItemID, inventoryReply.InventoryData[0].FolderID,
|
||||
FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS,
|
||||
FULL_MASK_PERMISSIONS);
|
||||
Helpers.InventoryCRC(
|
||||
1000, 0, inventoryReply.InventoryData[0].InvType,
|
||||
inventoryReply.InventoryData[0].Type, inventoryReply.InventoryData[0].AssetID,
|
||||
inventoryReply.InventoryData[0].GroupID, 100,
|
||||
inventoryReply.InventoryData[0].OwnerID, inventoryReply.InventoryData[0].CreatorID,
|
||||
inventoryReply.InventoryData[0].ItemID, inventoryReply.InventoryData[0].FolderID,
|
||||
FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS,
|
||||
FULL_MASK_PERMISSIONS);
|
||||
inventoryReply.Header.Zerocoded = true;
|
||||
OutPacket(inventoryReply, ThrottleOutPacketType.Asset);
|
||||
}
|
||||
|
@ -2075,7 +2076,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
itemBlock.ItemID = item.ID;
|
||||
itemBlock.AssetID = item.AssetID;
|
||||
itemBlock.CreatorID = item.Creator;
|
||||
itemBlock.CreatorID = item.CreatorIdAsUuid;
|
||||
itemBlock.BaseMask = item.BasePermissions;
|
||||
itemBlock.Description = LLUtil.StringToPacketBytes(item.Description);
|
||||
itemBlock.EveryoneMask = item.EveryOnePermissions;
|
||||
|
@ -2138,7 +2139,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
bulkUpdate.ItemData[0] = new BulkUpdateInventoryPacket.ItemDataBlock();
|
||||
bulkUpdate.ItemData[0].ItemID = item.ID;
|
||||
bulkUpdate.ItemData[0].AssetID = item.AssetID;
|
||||
bulkUpdate.ItemData[0].CreatorID = item.Creator;
|
||||
bulkUpdate.ItemData[0].CreatorID = item.CreatorIdAsUuid;
|
||||
bulkUpdate.ItemData[0].BaseMask = item.BasePermissions;
|
||||
bulkUpdate.ItemData[0].CreationDate = item.CreationDate;
|
||||
bulkUpdate.ItemData[0].Description = LLUtil.StringToPacketBytes(item.Description);
|
||||
|
@ -2186,7 +2187,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
InventoryReply.InventoryData[0] = new UpdateCreateInventoryItemPacket.InventoryDataBlock();
|
||||
InventoryReply.InventoryData[0].ItemID = Item.ID;
|
||||
InventoryReply.InventoryData[0].AssetID = Item.AssetID;
|
||||
InventoryReply.InventoryData[0].CreatorID = Item.Creator;
|
||||
InventoryReply.InventoryData[0].CreatorID = Item.CreatorIdAsUuid;
|
||||
InventoryReply.InventoryData[0].BaseMask = Item.BasePermissions;
|
||||
InventoryReply.InventoryData[0].Description = LLUtil.StringToPacketBytes(Item.Description);
|
||||
InventoryReply.InventoryData[0].EveryoneMask = Item.EveryOnePermissions;
|
||||
|
@ -6746,7 +6747,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
InventoryItemBase item = new InventoryItemBase();
|
||||
item.ID = rezScriptx.InventoryBlock.ItemID;
|
||||
item.Folder = rezScriptx.InventoryBlock.FolderID;
|
||||
item.Creator = rezScriptx.InventoryBlock.CreatorID;
|
||||
item.CreatorId = rezScriptx.InventoryBlock.CreatorID.ToString();
|
||||
item.Owner = rezScriptx.InventoryBlock.OwnerID;
|
||||
item.BasePermissions = rezScriptx.InventoryBlock.BaseMask;
|
||||
item.CurrentPermissions = rezScriptx.InventoryBlock.OwnerMask;
|
||||
|
|
|
@ -211,7 +211,6 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void DoCreateItem(uint callbackID)
|
||||
{
|
||||
m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(m_asset);
|
||||
|
@ -223,7 +222,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
|||
{
|
||||
InventoryItemBase item = new InventoryItemBase();
|
||||
item.Owner = ourClient.AgentId;
|
||||
item.Creator = ourClient.AgentId;
|
||||
item.CreatorId = ourClient.AgentId.ToString();
|
||||
item.ID = UUID.Random();
|
||||
item.AssetID = m_asset.FullID;
|
||||
item.Description = m_description;
|
||||
|
|
|
@ -819,7 +819,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
item.AssetType = (int)AssetType.CallingCard;
|
||||
item.BasePermissions = (uint)PermissionMask.Copy;
|
||||
item.CreationDate = Util.UnixTimeSinceEpoch();
|
||||
item.Creator = creator;
|
||||
item.CreatorId = creator.ToString();
|
||||
item.CurrentPermissions = item.BasePermissions;
|
||||
item.Description = "";
|
||||
item.EveryOnePermissions = (uint)PermissionMask.None;
|
||||
|
|
|
@ -97,7 +97,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
item.InvType = Convert.ToInt32(reader.ReadString());
|
||||
reader.ReadEndElement();
|
||||
reader.ReadStartElement("CreatorUUID");
|
||||
item.Creator = UUID.Parse(reader.ReadString());
|
||||
item.CreatorId = reader.ReadString();
|
||||
reader.ReadEndElement();
|
||||
reader.ReadStartElement("CreationDate");
|
||||
item.CreationDate = Convert.ToInt32(reader.ReadString());
|
||||
|
@ -329,7 +329,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
// Don't use the item ID that's in the file
|
||||
item.ID = UUID.Random();
|
||||
|
||||
item.Creator = m_userInfo.UserProfile.ID;
|
||||
item.CreatorId = m_userInfo.UserProfile.ID.ToString();
|
||||
item.Owner = m_userInfo.UserProfile.ID;
|
||||
|
||||
// Reset folder ID to the one in which we want to load it
|
||||
|
|
|
@ -140,7 +140,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
writer.WriteString(inventoryItem.InvType.ToString());
|
||||
writer.WriteEndElement();
|
||||
writer.WriteStartElement("CreatorUUID");
|
||||
writer.WriteString(inventoryItem.Creator.ToString());
|
||||
writer.WriteString(inventoryItem.CreatorId);
|
||||
writer.WriteEndElement();
|
||||
writer.WriteStartElement("CreationDate");
|
||||
writer.WriteString(inventoryItem.CreationDate.ToString());
|
||||
|
@ -189,7 +189,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
|
||||
m_archive.WriteFile(filename, sw.ToString());
|
||||
|
||||
UUID creatorId = inventoryItem.Creator;
|
||||
UUID creatorId = inventoryItem.CreatorIdAsUuid;
|
||||
|
||||
// Record the creator of this item
|
||||
m_userUuids[creatorId] = 1;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
|
|
|
@ -478,7 +478,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// Insert a copy of the item into the recipient
|
||||
InventoryItemBase itemCopy = new InventoryItemBase();
|
||||
itemCopy.Owner = recipient;
|
||||
itemCopy.Creator = item.Creator;
|
||||
itemCopy.CreatorId = item.CreatorId;
|
||||
itemCopy.ID = UUID.Random();
|
||||
itemCopy.AssetID = item.AssetID;
|
||||
itemCopy.Description = item.Description;
|
||||
|
@ -836,7 +836,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
InventoryItemBase item = new InventoryItemBase();
|
||||
item.Owner = remoteClient.AgentId;
|
||||
item.Creator = remoteClient.AgentId;
|
||||
item.CreatorId = remoteClient.AgentId.ToString();
|
||||
item.ID = UUID.Random();
|
||||
item.AssetID = asset.FullID;
|
||||
item.Description = asset.Description;
|
||||
|
@ -1086,7 +1086,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
InventoryItemBase agentItem = new InventoryItemBase();
|
||||
|
||||
agentItem.ID = UUID.Random();
|
||||
agentItem.Creator = taskItem.CreatorID;
|
||||
agentItem.CreatorId = taskItem.CreatorID.ToString();
|
||||
agentItem.Owner = destAgent;
|
||||
agentItem.AssetID = taskItem.AssetID;
|
||||
agentItem.Description = taskItem.Description;
|
||||
|
@ -1549,7 +1549,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
taskItem.Type = itemBase.AssetType;
|
||||
taskItem.InvType = itemBase.InvType;
|
||||
taskItem.OwnerID = itemBase.Owner;
|
||||
taskItem.CreatorID = itemBase.Creator;
|
||||
taskItem.CreatorID = itemBase.CreatorIdAsUuid;
|
||||
taskItem.BasePermissions = itemBase.BasePermissions;
|
||||
taskItem.CurrentPermissions = itemBase.CurrentPermissions;
|
||||
taskItem.EveryonePermissions = itemBase.EveryOnePermissions;
|
||||
|
@ -1946,12 +1946,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
item = new InventoryItemBase();
|
||||
item.Creator = objectGroup.RootPart.CreatorID;
|
||||
item.CreatorId = objectGroup.RootPart.CreatorID.ToString();
|
||||
item.ID = UUID.Random();
|
||||
item.InvType = (int)InventoryType.Object;
|
||||
item.Folder = folder.ID;
|
||||
item.Owner = userInfo.UserProfile.ID;
|
||||
|
||||
}
|
||||
|
||||
AssetBase asset = CreateAsset(
|
||||
|
@ -2115,6 +2114,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
CachedUserInfo userInfo =
|
||||
CommsManager.UserProfileCacheService.GetUserDetails(AgentId);
|
||||
|
||||
if (userInfo != null)
|
||||
{
|
||||
AssetBase asset = CreateAsset(
|
||||
|
@ -2125,7 +2125,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
CommsManager.AssetCache.AddAsset(asset);
|
||||
|
||||
InventoryItemBase item = new InventoryItemBase();
|
||||
item.Creator = grp.RootPart.CreatorID;
|
||||
item.CreatorId = grp.RootPart.CreatorID.ToString();
|
||||
item.Owner = remoteClient.AgentId;
|
||||
item.ID = UUID.Random();
|
||||
item.AssetID = asset.FullID;
|
||||
|
|
|
@ -3368,7 +3368,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
CommsManager.AssetCache.AddAsset(asset);
|
||||
|
||||
InventoryItemBase item = new InventoryItemBase();
|
||||
item.Creator = part.CreatorID;
|
||||
item.CreatorId = part.CreatorID.ToString();
|
||||
|
||||
item.ID = UUID.Random();
|
||||
item.Owner = remoteClient.AgentId;
|
||||
|
|
|
@ -151,7 +151,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
taskItem.Name = item.Name;
|
||||
taskItem.Description = item.Description;
|
||||
taskItem.OwnerID = part.OwnerID; // Transfer ownership
|
||||
taskItem.CreatorID = item.Creator;
|
||||
taskItem.CreatorID = item.CreatorIdAsUuid;
|
||||
taskItem.Type = item.AssetType;
|
||||
taskItem.InvType = item.InvType;
|
||||
|
||||
|
|
Loading…
Reference in New Issue