aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLAssetData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLAssetData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 823fa78..508e053 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -26,15 +26,13 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic;
30using System.Data; 29using System.Data;
31using System.Reflection; 30using System.Reflection;
32using OpenMetaverse;
33using log4net; 31using log4net;
34using MySql.Data.MySqlClient; 32using MySql.Data.MySqlClient;
33using OpenMetaverse;
35using OpenSim.Framework; 34using OpenSim.Framework;
36 35
37
38namespace OpenSim.Data.MySQL 36namespace OpenSim.Data.MySQL
39{ 37{
40 /// <summary> 38 /// <summary>
@@ -62,7 +60,7 @@ namespace OpenSim.Data.MySQL
62 /// <param name="connect">connect string</param> 60 /// <param name="connect">connect string</param>
63 override public void Initialise(string connect) 61 override public void Initialise(string connect)
64 { 62 {
65 TicksToEpoch = new System.DateTime(1970,1,1).Ticks; 63 TicksToEpoch = new DateTime(1970,1,1).Ticks;
66 64
67 // TODO: This will let you pass in the connect string in 65 // TODO: This will let you pass in the connect string in
68 // the config, though someone will need to write that. 66 // the config, though someone will need to write that.
@@ -145,7 +143,7 @@ namespace OpenSim.Data.MySQL
145 { 143 {
146 asset.Metadata.Local = (bool)dbReader["local"]; 144 asset.Metadata.Local = (bool)dbReader["local"];
147 } 145 }
148 catch (System.InvalidCastException) 146 catch (InvalidCastException)
149 { 147 {
150 asset.Metadata.Local = false; 148 asset.Metadata.Local = false;
151 } 149 }
@@ -199,7 +197,7 @@ namespace OpenSim.Data.MySQL
199 using (cmd) 197 using (cmd)
200 { 198 {
201 // create unix epoch time 199 // create unix epoch time
202 int now = (int)((System.DateTime.Now.Ticks - TicksToEpoch) / 10000000); 200 int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000);
203 cmd.Parameters.AddWithValue("?id", asset.Metadata.ID); 201 cmd.Parameters.AddWithValue("?id", asset.Metadata.ID);
204 cmd.Parameters.AddWithValue("?name", asset.Metadata.Name); 202 cmd.Parameters.AddWithValue("?name", asset.Metadata.Name);
205 cmd.Parameters.AddWithValue("?description", asset.Metadata.Description); 203 cmd.Parameters.AddWithValue("?description", asset.Metadata.Description);
@@ -240,7 +238,7 @@ namespace OpenSim.Data.MySQL
240 using (cmd) 238 using (cmd)
241 { 239 {
242 // create unix epoch time 240 // create unix epoch time
243 int now = (int)((System.DateTime.Now.Ticks - TicksToEpoch) / 10000000); 241 int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000);
244 cmd.Parameters.AddWithValue("?id", asset.Metadata.ID); 242 cmd.Parameters.AddWithValue("?id", asset.Metadata.ID);
245 cmd.Parameters.AddWithValue("?access_time", now); 243 cmd.Parameters.AddWithValue("?access_time", now);
246 cmd.ExecuteNonQuery(); 244 cmd.ExecuteNonQuery();