diff options
author | Mike Mazur | 2009-02-17 01:36:44 +0000 |
---|---|---|
committer | Mike Mazur | 2009-02-17 01:36:44 +0000 |
commit | 76c0935ec744f2d230489398f879eb7f42b11d37 (patch) | |
tree | a68253554e3899f10b6c341db369ce4a029dfaa5 /OpenSim/Data/MSSQL | |
parent | Major change to how appearance is managed, including changes in login and use... (diff) | |
download | opensim-SC_OLD-76c0935ec744f2d230489398f879eb7f42b11d37.zip opensim-SC_OLD-76c0935ec744f2d230489398f879eb7f42b11d37.tar.gz opensim-SC_OLD-76c0935ec744f2d230489398f879eb7f42b11d37.tar.bz2 opensim-SC_OLD-76c0935ec744f2d230489398f879eb7f42b11d37.tar.xz |
- remove the Metadata property from AssetBase and return all previous
properties as before
- prefix private variables with m_ in AssetBase.cs
- related to Mantis #3122, as mentioned in
https://lists.berlios.de/pipermail/opensim-dev/2009-February/005088.html
- all services will likely need to be upgraded after this commit
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLAssetData.cs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs index 27deef7..0361a7d 100644 --- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs | |||
@@ -132,12 +132,12 @@ namespace OpenSim.Data.MSSQL | |||
132 | { | 132 | { |
133 | AssetBase asset = new AssetBase(); | 133 | AssetBase asset = new AssetBase(); |
134 | // Region Main | 134 | // Region Main |
135 | asset.Metadata.FullID = new UUID((string)reader["id"]); | 135 | asset.FullID = new UUID((string)reader["id"]); |
136 | asset.Metadata.Name = (string)reader["name"]; | 136 | asset.Name = (string)reader["name"]; |
137 | asset.Metadata.Description = (string)reader["description"]; | 137 | asset.Description = (string)reader["description"]; |
138 | asset.Metadata.Type = Convert.ToSByte(reader["assetType"]); | 138 | asset.Type = Convert.ToSByte(reader["assetType"]); |
139 | asset.Metadata.Local = Convert.ToBoolean(reader["local"]); | 139 | asset.Local = Convert.ToBoolean(reader["local"]); |
140 | asset.Metadata.Temporary = Convert.ToBoolean(reader["temporary"]); | 140 | asset.Temporary = Convert.ToBoolean(reader["temporary"]); |
141 | asset.Data = (byte[])reader["data"]; | 141 | asset.Data = (byte[])reader["data"]; |
142 | return asset; | 142 | return asset; |
143 | } | 143 | } |
@@ -152,7 +152,7 @@ namespace OpenSim.Data.MSSQL | |||
152 | /// <param name="asset">the asset</param> | 152 | /// <param name="asset">the asset</param> |
153 | override public void CreateAsset(AssetBase asset) | 153 | override public void CreateAsset(AssetBase asset) |
154 | { | 154 | { |
155 | if (ExistsAsset(asset.Metadata.FullID)) | 155 | if (ExistsAsset(asset.FullID)) |
156 | { | 156 | { |
157 | return; | 157 | return; |
158 | } | 158 | } |
@@ -163,12 +163,12 @@ namespace OpenSim.Data.MSSQL | |||
163 | "(@id, @name, @description, @assetType, @local, @temporary, @create_time, @access_time, @data)")) | 163 | "(@id, @name, @description, @assetType, @local, @temporary, @create_time, @access_time, @data)")) |
164 | { | 164 | { |
165 | int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000); | 165 | int now = (int)((DateTime.Now.Ticks - TicksToEpoch) / 10000000); |
166 | command.Parameters.Add(database.CreateParameter("id", asset.Metadata.FullID)); | 166 | command.Parameters.Add(database.CreateParameter("id", asset.FullID)); |
167 | command.Parameters.Add(database.CreateParameter("name", asset.Metadata.Name)); | 167 | command.Parameters.Add(database.CreateParameter("name", asset.Name)); |
168 | command.Parameters.Add(database.CreateParameter("description", asset.Metadata.Description)); | 168 | command.Parameters.Add(database.CreateParameter("description", asset.Description)); |
169 | command.Parameters.Add(database.CreateParameter("assetType", asset.Metadata.Type)); | 169 | command.Parameters.Add(database.CreateParameter("assetType", asset.Type)); |
170 | command.Parameters.Add(database.CreateParameter("local", asset.Metadata.Local)); | 170 | command.Parameters.Add(database.CreateParameter("local", asset.Local)); |
171 | command.Parameters.Add(database.CreateParameter("temporary", asset.Metadata.Temporary)); | 171 | command.Parameters.Add(database.CreateParameter("temporary", asset.Temporary)); |
172 | command.Parameters.Add(database.CreateParameter("access_time", now)); | 172 | command.Parameters.Add(database.CreateParameter("access_time", now)); |
173 | command.Parameters.Add(database.CreateParameter("create_time", now)); | 173 | command.Parameters.Add(database.CreateParameter("create_time", now)); |
174 | command.Parameters.Add(database.CreateParameter("data", asset.Data)); | 174 | command.Parameters.Add(database.CreateParameter("data", asset.Data)); |
@@ -192,14 +192,14 @@ namespace OpenSim.Data.MSSQL | |||
192 | "data = @data where " + | 192 | "data = @data where " + |
193 | "id = @keyId;")) | 193 | "id = @keyId;")) |
194 | { | 194 | { |
195 | command.Parameters.Add(database.CreateParameter("id", asset.Metadata.FullID)); | 195 | command.Parameters.Add(database.CreateParameter("id", asset.FullID)); |
196 | command.Parameters.Add(database.CreateParameter("name", asset.Metadata.Name)); | 196 | command.Parameters.Add(database.CreateParameter("name", asset.Name)); |
197 | command.Parameters.Add(database.CreateParameter("description", asset.Metadata.Description)); | 197 | command.Parameters.Add(database.CreateParameter("description", asset.Description)); |
198 | command.Parameters.Add(database.CreateParameter("assetType", asset.Metadata.Type)); | 198 | command.Parameters.Add(database.CreateParameter("assetType", asset.Type)); |
199 | command.Parameters.Add(database.CreateParameter("local", asset.Metadata.Local)); | 199 | command.Parameters.Add(database.CreateParameter("local", asset.Local)); |
200 | command.Parameters.Add(database.CreateParameter("temporary", asset.Metadata.Temporary)); | 200 | command.Parameters.Add(database.CreateParameter("temporary", asset.Temporary)); |
201 | command.Parameters.Add(database.CreateParameter("data", asset.Data)); | 201 | command.Parameters.Add(database.CreateParameter("data", asset.Data)); |
202 | command.Parameters.Add(database.CreateParameter("@keyId", asset.Metadata.FullID)); | 202 | command.Parameters.Add(database.CreateParameter("@keyId", asset.FullID)); |
203 | 203 | ||
204 | try | 204 | try |
205 | { | 205 | { |