aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorMelanie2010-08-06 17:47:55 +0100
committerMelanie2010-08-06 17:47:55 +0100
commit1cd441d5de0e19aac230e3bc8eac211662f209b5 (patch)
tree6b6a69e755fd72d894f8b3742efde6189883570e /OpenSim/Data
parentFixes: llSetLinkPrimitiveParams - PRIM_POSITION is not relative to root, caus... (diff)
parentMerge branch 'moap' (diff)
downloadopensim-SC_OLD-1cd441d5de0e19aac230e3bc8eac211662f209b5.zip
opensim-SC_OLD-1cd441d5de0e19aac230e3bc8eac211662f209b5.tar.gz
opensim-SC_OLD-1cd441d5de0e19aac230e3bc8eac211662f209b5.tar.bz2
opensim-SC_OLD-1cd441d5de0e19aac230e3bc8eac211662f209b5.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs22
-rw-r--r--OpenSim/Data/MSSQL/Resources/RegionStore.migrations9
-rw-r--r--OpenSim/Data/MySQL/MySQLLegacyRegionData.cs16
-rw-r--r--OpenSim/Data/MySQL/Resources/RegionStore.migrations9
-rw-r--r--OpenSim/Data/SQLite/Resources/020_RegionStore.sql6
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs24
6 files changed, 69 insertions, 17 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs b/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs
index d6cb91f..7c176c7 100644
--- a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs
@@ -327,7 +327,7 @@ IF EXISTS (SELECT UUID FROM prims WHERE UUID = @UUID)
327 ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice, 327 ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice,
328 SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem, 328 SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem,
329 ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches, 329 ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches,
330 LinkNumber = @LinkNumber 330 LinkNumber = @LinkNumber, MediaURL = @MediaURL
331 WHERE UUID = @UUID 331 WHERE UUID = @UUID
332 END 332 END
333ELSE 333ELSE
@@ -342,7 +342,7 @@ ELSE
342 PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, 342 PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX,
343 OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, 343 OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ,
344 ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, 344 ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA,
345 ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber 345 ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, PassTouches, LinkNumber, MediaURL
346 ) VALUES ( 346 ) VALUES (
347 @UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask, 347 @UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask,
348 @EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX, 348 @EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX,
@@ -352,7 +352,7 @@ ELSE
352 @PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX, 352 @PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX,
353 @OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ, 353 @OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ,
354 @ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA, 354 @ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA,
355 @ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber 355 @ParticleSystem, @ClickAction, @Material, @CollisionSound, @CollisionSoundVolume, @PassTouches, @LinkNumber, @MediaURL
356 ) 356 )
357 END"; 357 END";
358 358
@@ -385,7 +385,7 @@ IF EXISTS (SELECT UUID FROM primshapes WHERE UUID = @UUID)
385 PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions, 385 PathSkew = @PathSkew, PathCurve = @PathCurve, PathRadiusOffset = @PathRadiusOffset, PathRevolutions = @PathRevolutions,
386 PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin, 386 PathTaperX = @PathTaperX, PathTaperY = @PathTaperY, PathTwist = @PathTwist, PathTwistBegin = @PathTwistBegin,
387 ProfileBegin = @ProfileBegin, ProfileEnd = @ProfileEnd, ProfileCurve = @ProfileCurve, ProfileHollow = @ProfileHollow, 387 ProfileBegin = @ProfileBegin, ProfileEnd = @ProfileEnd, ProfileCurve = @ProfileCurve, ProfileHollow = @ProfileHollow,
388 Texture = @Texture, ExtraParams = @ExtraParams, State = @State 388 Texture = @Texture, ExtraParams = @ExtraParams, State = @State, Media = @Media
389 WHERE UUID = @UUID 389 WHERE UUID = @UUID
390 END 390 END
391ELSE 391ELSE
@@ -394,11 +394,11 @@ ELSE
394 primshapes ( 394 primshapes (
395 UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, 395 UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY,
396 PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, 396 PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin,
397 ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State 397 ProfileEnd, ProfileCurve, ProfileHollow, Texture, ExtraParams, State, Media
398 ) VALUES ( 398 ) VALUES (
399 @UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY, 399 @UUID, @Shape, @ScaleX, @ScaleY, @ScaleZ, @PCode, @PathBegin, @PathEnd, @PathScaleX, @PathScaleY, @PathShearX, @PathShearY,
400 @PathSkew, @PathCurve, @PathRadiusOffset, @PathRevolutions, @PathTaperX, @PathTaperY, @PathTwist, @PathTwistBegin, @ProfileBegin, 400 @PathSkew, @PathCurve, @PathRadiusOffset, @PathRevolutions, @PathTaperX, @PathTaperY, @PathTwist, @PathTwistBegin, @ProfileBegin,
401 @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State 401 @ProfileEnd, @ProfileCurve, @ProfileHollow, @Texture, @ExtraParams, @State, @Media
402 ) 402 )
403 END"; 403 END";
404 404
@@ -1127,6 +1127,9 @@ VALUES
1127 if (Convert.ToInt16(primRow["PassTouches"]) != 0) 1127 if (Convert.ToInt16(primRow["PassTouches"]) != 0)
1128 prim.PassTouches = true; 1128 prim.PassTouches = true;
1129 prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]); 1129 prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]);
1130
1131 if (!(primRow["MediaURL"] is System.DBNull))
1132 prim.MediaUrl = (string)primRow["MediaURL"];
1130 1133
1131 return prim; 1134 return prim;
1132 } 1135 }
@@ -1180,6 +1183,9 @@ VALUES
1180 { 1183 {
1181 } 1184 }
1182 1185
1186 if (!(shapeRow["Media"] is System.DBNull))
1187 baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]);
1188
1183 return baseShape; 1189 return baseShape;
1184 } 1190 }
1185 1191
@@ -1509,7 +1515,8 @@ VALUES
1509 parameters.Add(_Database.CreateParameter("PassTouches", 1)); 1515 parameters.Add(_Database.CreateParameter("PassTouches", 1));
1510 else 1516 else
1511 parameters.Add(_Database.CreateParameter("PassTouches", 0)); 1517 parameters.Add(_Database.CreateParameter("PassTouches", 0));
1512 parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); 1518 parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
1519 parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
1513 1520
1514 return parameters.ToArray(); 1521 return parameters.ToArray();
1515 } 1522 }
@@ -1557,6 +1564,7 @@ VALUES
1557 parameters.Add(_Database.CreateParameter("Texture", s.TextureEntry)); 1564 parameters.Add(_Database.CreateParameter("Texture", s.TextureEntry));
1558 parameters.Add(_Database.CreateParameter("ExtraParams", s.ExtraParams)); 1565 parameters.Add(_Database.CreateParameter("ExtraParams", s.ExtraParams));
1559 parameters.Add(_Database.CreateParameter("State", s.State)); 1566 parameters.Add(_Database.CreateParameter("State", s.State));
1567 parameters.Add(_Database.CreateParameter("Media", null == s.Media ? null : s.Media.ToXml()));
1560 1568
1561 return parameters.ToArray(); 1569 return parameters.ToArray();
1562 } 1570 }
diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
index e912d64..e2e8cbb 100644
--- a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
@@ -1,4 +1,4 @@
1 1
2:VERSION 1 2:VERSION 1
3 3
4CREATE TABLE [dbo].[prims]( 4CREATE TABLE [dbo].[prims](
@@ -925,5 +925,12 @@ ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0
925 925
926COMMIT 926COMMIT
927 927
928:VERSION 24
929-- Added post 0.7
930
931BEGIN TRANSACTION
928 932
933ALTER TABLE prims ADD COLUMN MediaURL varchar(255)
934ALTER TABLE primshapes ADD COLUMN Media TEXT
929 935
936COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
index bfeae12..d8debc5 100644
--- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
@@ -174,7 +174,7 @@ namespace OpenSim.Data.MySQL
174 "ParticleSystem, ClickAction, Material, " + 174 "ParticleSystem, ClickAction, Material, " +
175 "CollisionSound, CollisionSoundVolume, " + 175 "CollisionSound, CollisionSoundVolume, " +
176 "PassTouches, " + 176 "PassTouches, " +
177 "LinkNumber) values (" + "?UUID, " + 177 "LinkNumber, MediaURL) values (" + "?UUID, " +
178 "?CreationDate, ?Name, ?Text, " + 178 "?CreationDate, ?Name, ?Text, " +
179 "?Description, ?SitName, ?TouchName, " + 179 "?Description, ?SitName, ?TouchName, " +
180 "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " + 180 "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " +
@@ -205,7 +205,7 @@ namespace OpenSim.Data.MySQL
205 "?SaleType, ?ColorR, ?ColorG, " + 205 "?SaleType, ?ColorR, ?ColorG, " +
206 "?ColorB, ?ColorA, ?ParticleSystem, " + 206 "?ColorB, ?ColorA, ?ParticleSystem, " +
207 "?ClickAction, ?Material, ?CollisionSound, " + 207 "?ClickAction, ?Material, ?CollisionSound, " +
208 "?CollisionSoundVolume, ?PassTouches, ?LinkNumber)"; 208 "?CollisionSoundVolume, ?PassTouches, ?LinkNumber, ?MediaURL)";
209 209
210 FillPrimCommand(cmd, prim, obj.UUID, regionUUID); 210 FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
211 211
@@ -222,7 +222,7 @@ namespace OpenSim.Data.MySQL
222 "PathTaperX, PathTaperY, PathTwist, " + 222 "PathTaperX, PathTaperY, PathTwist, " +
223 "PathTwistBegin, ProfileBegin, ProfileEnd, " + 223 "PathTwistBegin, ProfileBegin, ProfileEnd, " +
224 "ProfileCurve, ProfileHollow, Texture, " + 224 "ProfileCurve, ProfileHollow, Texture, " +
225 "ExtraParams, State) values (?UUID, " + 225 "ExtraParams, State, Media) values (?UUID, " +
226 "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " + 226 "?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " +
227 "?PCode, ?PathBegin, ?PathEnd, " + 227 "?PCode, ?PathBegin, ?PathEnd, " +
228 "?PathScaleX, ?PathScaleY, " + 228 "?PathScaleX, ?PathScaleY, " +
@@ -233,7 +233,7 @@ namespace OpenSim.Data.MySQL
233 "?PathTwistBegin, ?ProfileBegin, " + 233 "?PathTwistBegin, ?ProfileBegin, " +
234 "?ProfileEnd, ?ProfileCurve, " + 234 "?ProfileEnd, ?ProfileCurve, " +
235 "?ProfileHollow, ?Texture, ?ExtraParams, " + 235 "?ProfileHollow, ?Texture, ?ExtraParams, " +
236 "?State)"; 236 "?State, ?Media)";
237 237
238 FillShapeCommand(cmd, prim); 238 FillShapeCommand(cmd, prim);
239 239
@@ -1184,6 +1184,9 @@ namespace OpenSim.Data.MySQL
1184 1184
1185 prim.PassTouches = ((sbyte)row["PassTouches"] != 0); 1185 prim.PassTouches = ((sbyte)row["PassTouches"] != 0);
1186 prim.LinkNum = (int)row["LinkNumber"]; 1186 prim.LinkNum = (int)row["LinkNumber"];
1187
1188 if (!(row["MediaURL"] is System.DBNull))
1189 prim.MediaUrl = (string)row["MediaURL"];
1187 1190
1188 return prim; 1191 return prim;
1189 } 1192 }
@@ -1521,6 +1524,7 @@ namespace OpenSim.Data.MySQL
1521 cmd.Parameters.AddWithValue("PassTouches", 0); 1524 cmd.Parameters.AddWithValue("PassTouches", 0);
1522 1525
1523 cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); 1526 cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
1527 cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl);
1524 } 1528 }
1525 1529
1526 /// <summary> 1530 /// <summary>
@@ -1700,6 +1704,9 @@ namespace OpenSim.Data.MySQL
1700 s.ExtraParams = (byte[])row["ExtraParams"]; 1704 s.ExtraParams = (byte[])row["ExtraParams"];
1701 1705
1702 s.State = (byte)(int)row["State"]; 1706 s.State = (byte)(int)row["State"];
1707
1708 if (!(row["Media"] is System.DBNull))
1709 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
1703 1710
1704 return s; 1711 return s;
1705 } 1712 }
@@ -1743,6 +1750,7 @@ namespace OpenSim.Data.MySQL
1743 cmd.Parameters.AddWithValue("Texture", s.TextureEntry); 1750 cmd.Parameters.AddWithValue("Texture", s.TextureEntry);
1744 cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams); 1751 cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams);
1745 cmd.Parameters.AddWithValue("State", s.State); 1752 cmd.Parameters.AddWithValue("State", s.State);
1753 cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml());
1746 } 1754 }
1747 1755
1748 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) 1756 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
index 3f644f9..1369704 100644
--- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
@@ -1,4 +1,4 @@
1 1
2:VERSION 1 #--------------------- 2:VERSION 1 #---------------------
3 3
4BEGIN; 4BEGIN;
@@ -800,3 +800,10 @@ BEGIN;
800ALTER TABLE `regionwindlight` CHANGE COLUMN `cloud_scroll_x` `cloud_scroll_x` FLOAT(4,2) NOT NULL DEFAULT '0.20' AFTER `cloud_detail_density`, CHANGE COLUMN `cloud_scroll_y` `cloud_scroll_y` FLOAT(4,2) NOT NULL DEFAULT '0.01' AFTER `cloud_scroll_x_lock`; 800ALTER TABLE `regionwindlight` CHANGE COLUMN `cloud_scroll_x` `cloud_scroll_x` FLOAT(4,2) NOT NULL DEFAULT '0.20' AFTER `cloud_detail_density`, CHANGE COLUMN `cloud_scroll_y` `cloud_scroll_y` FLOAT(4,2) NOT NULL DEFAULT '0.01' AFTER `cloud_scroll_x_lock`;
801COMMIT; 801COMMIT;
802 802
803:VERSION 35 #---------------------
804-- Added post 0.7
805
806BEGIN;
807ALTER TABLE prims ADD COLUMN MediaURL varchar(255);
808ALTER TABLE primshapes ADD COLUMN Media TEXT;
809COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/020_RegionStore.sql b/OpenSim/Data/SQLite/Resources/020_RegionStore.sql
new file mode 100644
index 0000000..39cb752
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/020_RegionStore.sql
@@ -0,0 +1,6 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN MediaURL varchar(255);
4ALTER TABLE primshapes ADD COLUMN Media TEXT;
5
6COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 81d0ac4..4208050 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -34,6 +34,7 @@ using System.Reflection;
34using log4net; 34using log4net;
35using Mono.Data.Sqlite; 35using Mono.Data.Sqlite;
36using OpenMetaverse; 36using OpenMetaverse;
37using OpenMetaverse.StructuredData;
37using OpenSim.Framework; 38using OpenSim.Framework;
38using OpenSim.Region.Framework.Interfaces; 39using OpenSim.Region.Framework.Interfaces;
39using OpenSim.Region.Framework.Scenes; 40using OpenSim.Region.Framework.Scenes;
@@ -974,6 +975,8 @@ namespace OpenSim.Data.SQLite
974 createCol(prims, "CollisionSoundVolume", typeof(Double)); 975 createCol(prims, "CollisionSoundVolume", typeof(Double));
975 976
976 createCol(prims, "VolumeDetect", typeof(Int16)); 977 createCol(prims, "VolumeDetect", typeof(Int16));
978
979 createCol(prims, "MediaURL", typeof(String));
977 980
978 // Add in contraints 981 // Add in contraints
979 prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; 982 prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]};
@@ -1021,6 +1024,7 @@ namespace OpenSim.Data.SQLite
1021 // way to specify this as a blob atm 1024 // way to specify this as a blob atm
1022 createCol(shapes, "Texture", typeof (Byte[])); 1025 createCol(shapes, "Texture", typeof (Byte[]));
1023 createCol(shapes, "ExtraParams", typeof (Byte[])); 1026 createCol(shapes, "ExtraParams", typeof (Byte[]));
1027 createCol(shapes, "Media", typeof(String));
1024 1028
1025 shapes.PrimaryKey = new DataColumn[] {shapes.Columns["UUID"]}; 1029 shapes.PrimaryKey = new DataColumn[] {shapes.Columns["UUID"]};
1026 1030
@@ -1339,6 +1343,12 @@ namespace OpenSim.Data.SQLite
1339 1343
1340 if (Convert.ToInt16(row["VolumeDetect"]) != 0) 1344 if (Convert.ToInt16(row["VolumeDetect"]) != 0)
1341 prim.VolumeDetectActive = true; 1345 prim.VolumeDetectActive = true;
1346
1347 if (!(row["MediaURL"] is System.DBNull))
1348 {
1349 //m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType());
1350 prim.MediaUrl = (string)row["MediaURL"];
1351 }
1342 1352
1343 return prim; 1353 return prim;
1344 } 1354 }
@@ -1614,7 +1624,6 @@ namespace OpenSim.Data.SQLite
1614 row["PayButton3"] = prim.PayPrice[3]; 1624 row["PayButton3"] = prim.PayPrice[3];
1615 row["PayButton4"] = prim.PayPrice[4]; 1625 row["PayButton4"] = prim.PayPrice[4];
1616 1626
1617
1618 row["TextureAnimation"] = Convert.ToBase64String(prim.TextureAnimation); 1627 row["TextureAnimation"] = Convert.ToBase64String(prim.TextureAnimation);
1619 row["ParticleSystem"] = Convert.ToBase64String(prim.ParticleSystem); 1628 row["ParticleSystem"] = Convert.ToBase64String(prim.ParticleSystem);
1620 1629
@@ -1674,7 +1683,8 @@ namespace OpenSim.Data.SQLite
1674 row["VolumeDetect"] = 1; 1683 row["VolumeDetect"] = 1;
1675 else 1684 else
1676 row["VolumeDetect"] = 0; 1685 row["VolumeDetect"] = 0;
1677 1686
1687 row["MediaURL"] = prim.MediaUrl;
1678 } 1688 }
1679 1689
1680 /// <summary> 1690 /// <summary>
@@ -1849,6 +1859,10 @@ namespace OpenSim.Data.SQLite
1849 s.TextureEntry = textureEntry; 1859 s.TextureEntry = textureEntry;
1850 1860
1851 s.ExtraParams = (byte[]) row["ExtraParams"]; 1861 s.ExtraParams = (byte[]) row["ExtraParams"];
1862
1863 if (!(row["Media"] is System.DBNull))
1864 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
1865
1852 return s; 1866 return s;
1853 } 1867 }
1854 1868
@@ -1892,17 +1906,19 @@ namespace OpenSim.Data.SQLite
1892 1906
1893 row["Texture"] = s.TextureEntry; 1907 row["Texture"] = s.TextureEntry;
1894 row["ExtraParams"] = s.ExtraParams; 1908 row["ExtraParams"] = s.ExtraParams;
1909
1910 if (s.Media != null)
1911 row["Media"] = s.Media.ToXml();
1895 } 1912 }
1896 1913
1897 /// <summary> 1914 /// <summary>
1898 /// 1915 /// Persistently store a prim.
1899 /// </summary> 1916 /// </summary>
1900 /// <param name="prim"></param> 1917 /// <param name="prim"></param>
1901 /// <param name="sceneGroupID"></param> 1918 /// <param name="sceneGroupID"></param>
1902 /// <param name="regionUUID"></param> 1919 /// <param name="regionUUID"></param>
1903 private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID) 1920 private void addPrim(SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
1904 { 1921 {
1905
1906 DataTable prims = ds.Tables["prims"]; 1922 DataTable prims = ds.Tables["prims"];
1907 DataTable shapes = ds.Tables["primshapes"]; 1923 DataTable shapes = ds.Tables["primshapes"];
1908 1924