aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Data/MySQL/MySQLXInventoryData.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs
index 307a4c7..a3b728b 100644
--- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs
@@ -160,5 +160,36 @@ namespace OpenSim.Data.MySQL
160 } 160 }
161 } 161 }
162 } 162 }
163
164 public override bool Store(XInventoryItem item)
165 {
166 if (base.Store(item))
167 return false;
168
169 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
170 {
171 dbcon.Open();
172
173 using (MySqlCommand cmd = new MySqlCommand())
174 {
175 cmd.Connection = dbcon;
176
177 cmd.CommandText = String.Format("update inventoryfolders set version=version+1 where folderID = ?folderID");
178 cmd.Parameters.AddWithValue("?folderID", item.parentFolderID.ToString());
179
180 try
181 {
182 cmd.ExecuteNonQuery();
183 }
184 catch (Exception e)
185 {
186 return false;
187 }
188 cmd.Dispose();
189 }
190 dbcon.Close();
191 }
192 return true;
193 }
163 } 194 }
164} 195}