diff options
author | Melanie | 2010-05-09 17:56:52 +0100 |
---|---|---|
committer | Melanie | 2010-05-09 17:56:52 +0100 |
commit | 60357d3778c95a47481f790803b7af39c70cde9c (patch) | |
tree | cc49f9da3a6907c32d3e8de31c1d811b11477d30 /OpenSim/Data/MySQL | |
parent | Add a field asset_flags and a corresponding enum to the asset database. This (diff) | |
download | opensim-SC_OLD-60357d3778c95a47481f790803b7af39c70cde9c.zip opensim-SC_OLD-60357d3778c95a47481f790803b7af39c70cde9c.tar.gz opensim-SC_OLD-60357d3778c95a47481f790803b7af39c70cde9c.tar.bz2 opensim-SC_OLD-60357d3778c95a47481f790803b7af39c70cde9c.tar.xz |
Implement the "delete" path for assets. Adds a new option to allow remote asset deletion in robust handler.
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAssetData.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 5a2af4f..35eed56 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -338,6 +338,24 @@ namespace OpenSim.Data.MySQL | |||
338 | return retList; | 338 | return retList; |
339 | } | 339 | } |
340 | 340 | ||
341 | public override bool Delete(string id) | ||
342 | { | ||
343 | lock (m_dbLock) | ||
344 | { | ||
345 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | ||
346 | { | ||
347 | dbcon.Open(); | ||
348 | MySqlCommand cmd = new MySqlCommand("delete from assets where id=?id"); | ||
349 | cmd.Parameters.AddWithValue("?id", id); | ||
350 | cmd.ExecuteNonQuery(); | ||
351 | |||
352 | cmd.Dispose(); | ||
353 | } | ||
354 | } | ||
355 | |||
356 | return true; | ||
357 | } | ||
358 | |||
341 | #endregion | 359 | #endregion |
342 | } | 360 | } |
343 | } | 361 | } |