From 1e444b1449ffad4969709c039f7c606c9f8f484d Mon Sep 17 00:00:00 2001 From: AliciaRaven Date: Tue, 31 Mar 2015 12:35:55 +0100 Subject: Change UserProfiles so that the parcel name is used for a ProfilePick and not the parcel owners name. This change also fixes a bug where if the avatar enters and does not move, creating or editing a ProfilePick would set the parcelId as an empty UUID. This is because ScenePresence.currentParcelUUID is not set until the avatar moves. Signed-off-by: Michael Cerquoni --- OpenSim/Data/MySQL/MySQLUserProfilesData.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Data/MySQL') diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs index 86f2efe..b35595d 100644 --- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs +++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs @@ -402,7 +402,7 @@ namespace OpenSim.Data.MySQL bool.TryParse((string)reader["enabled"], out pick.Enabled); pick.Name = (string)reader["name"]; pick.Desc = description; - pick.User = (string)reader["user"]; + pick.ParcelName = (string)reader["user"]; pick.OriginalName = (string)reader["originalname"]; pick.SimName = (string)reader["simname"]; pick.SortOrder = (int)reader["sortorder"]; @@ -443,6 +443,8 @@ namespace OpenSim.Data.MySQL query += "parceluuid=?ParcelId,"; query += "name=?Name,"; query += "description=?Desc,"; + query += "user=?User,"; + query += "simname=?SimName,"; query += "snapshotuuid=?SnapshotId,"; query += "pickuuid=?PickId,"; query += "posglobal=?GlobalPos,"; @@ -462,7 +464,7 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("?Name", pick.Name.ToString()); cmd.Parameters.AddWithValue("?Desc", pick.Desc.ToString()); cmd.Parameters.AddWithValue("?SnapshotId", pick.SnapshotId.ToString()); - cmd.Parameters.AddWithValue("?User", pick.User.ToString()); + cmd.Parameters.AddWithValue("?User", pick.ParcelName.ToString()); cmd.Parameters.AddWithValue("?Original", pick.OriginalName.ToString()); cmd.Parameters.AddWithValue("?SimName",pick.SimName.ToString()); cmd.Parameters.AddWithValue("?GlobalPos", pick.GlobalPos); -- cgit v1.1