Fixing a spot I missed in assets. Switching Grid to the new naming schema with Store/Get

This commit is contained in:
Kunnis
2009-08-16 23:25:12 -05:00
committed by Melanie
parent f1287cc7af
commit b1853d9f26
11 changed files with 43 additions and 70 deletions

View File

@@ -272,26 +272,23 @@ namespace OpenSim.Data.MSSQL
/// </summary>
/// <param name="profile">The profile to add</param>
/// <returns>A dataresponse enum indicating success</returns>
override public DataResponse AddProfile(RegionProfileData profile)
override public DataResponse StoreProfile(RegionProfileData profile)
{
if (InsertRegionRow(profile))
if (GetProfileByUUID(profile.UUID) == null)
{
return DataResponse.RESPONSE_OK;
if (InsertRegionRow(profile))
{
return DataResponse.RESPONSE_OK;
}
}
else
{
if (UpdateRegionRow(profile))
{
return DataResponse.RESPONSE_OK;
}
}
return DataResponse.RESPONSE_ERROR;
}
/// <summary>
/// Update the specified region in the database
/// </summary>
/// <param name="profile">The profile to update</param>
/// <returns>A dataresponse enum indicating success</returns>
override public DataResponse UpdateProfile(RegionProfileData profile)
{
if (UpdateRegionRow(profile))
{
return DataResponse.RESPONSE_OK;
}
return DataResponse.RESPONSE_ERROR;
}