diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLFSAssetData.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLFSAssetData.cs b/OpenSim/Data/MySQL/MySQLFSAssetData.cs index cb1755e..2fb81ae 100644 --- a/OpenSim/Data/MySQL/MySQLFSAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLFSAssetData.cs | |||
@@ -172,7 +172,7 @@ namespace OpenSim.Data.MySQL | |||
172 | meta.Flags = (AssetFlags)Convert.ToInt32(reader["asset_flags"]); | 172 | meta.Flags = (AssetFlags)Convert.ToInt32(reader["asset_flags"]); |
173 | 173 | ||
174 | int AccessTime = Convert.ToInt32(reader["access_time"]); | 174 | int AccessTime = Convert.ToInt32(reader["access_time"]); |
175 | UpdateAccessTime(AccessTime); | 175 | UpdateAccessTime(id, AccessTime); |
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
@@ -181,7 +181,7 @@ namespace OpenSim.Data.MySQL | |||
181 | return meta; | 181 | return meta; |
182 | } | 182 | } |
183 | 183 | ||
184 | private void UpdateAccessTime(int AccessTime) | 184 | private void UpdateAccessTime(string AssetID, int AccessTime) |
185 | { | 185 | { |
186 | // Reduce DB work by only updating access time if asset hasn't recently been accessed | 186 | // Reduce DB work by only updating access time if asset hasn't recently been accessed |
187 | // 0 By Default, Config option is "DaysBetweenAccessTimeUpdates" | 187 | // 0 By Default, Config option is "DaysBetweenAccessTimeUpdates" |
@@ -203,7 +203,7 @@ namespace OpenSim.Data.MySQL | |||
203 | using (MySqlCommand cmd = conn.CreateCommand()) | 203 | using (MySqlCommand cmd = conn.CreateCommand()) |
204 | { | 204 | { |
205 | cmd.CommandText = String.Format("UPDATE {0} SET `access_time` = UNIX_TIMESTAMP() WHERE `id` = ?id", m_Table); | 205 | cmd.CommandText = String.Format("UPDATE {0} SET `access_time` = UNIX_TIMESTAMP() WHERE `id` = ?id", m_Table); |
206 | 206 | cmd.Parameters.AddWithValue("?id", AssetID); | |
207 | cmd.ExecuteNonQuery(); | 207 | cmd.ExecuteNonQuery(); |
208 | } | 208 | } |
209 | } | 209 | } |