Add folder version incrementing to XInventoryService. Fixes offline give

for avatar->avatar
slimupdates
Melanie Thielker 2010-05-03 23:45:05 +02:00 committed by Melanie
parent f61b879f2d
commit 92dff5edb1
1 changed files with 31 additions and 0 deletions

View File

@ -160,5 +160,36 @@ namespace OpenSim.Data.MySQL
}
}
}
public override bool Store(XInventoryItem item)
{
if (base.Store(item))
return false;
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
dbcon.Open();
using (MySqlCommand cmd = new MySqlCommand())
{
cmd.Connection = dbcon;
cmd.CommandText = String.Format("update inventoryfolders set version=version+1 where folderID = ?folderID");
cmd.Parameters.AddWithValue("?folderID", item.parentFolderID.ToString());
try
{
cmd.ExecuteNonQuery();
}
catch (Exception e)
{
return false;
}
cmd.Dispose();
}
dbcon.Close();
}
return true;
}
}
}