aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSimulationData.cs
diff options
context:
space:
mode:
authorMelanie2012-05-27 19:24:30 +0100
committerMelanie2012-05-27 19:24:30 +0100
commit884c0e7bb10bd2c2a951901c6f1dd56a86ef6b9f (patch)
treedd692a54213f86fd64bd29c6662584df85088193 /OpenSim/Data/MySQL/MySQLSimulationData.cs
parentMerge branch 'master' into careminster (diff)
parentminor: code formatting from 0b72f773 (diff)
downloadopensim-SC-884c0e7bb10bd2c2a951901c6f1dd56a86ef6b9f.zip
opensim-SC-884c0e7bb10bd2c2a951901c6f1dd56a86ef6b9f.tar.gz
opensim-SC-884c0e7bb10bd2c2a951901c6f1dd56a86ef6b9f.tar.bz2
opensim-SC-884c0e7bb10bd2c2a951901c6f1dd56a86ef6b9f.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Data/MySQL/MySQLSimulationData.cs OpenSim/Data/MySQL/Resources/RegionStore.migrations OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLSimulationData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs62
1 files changed, 62 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 9467124..faf749f 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -994,6 +994,68 @@ namespace OpenSim.Data.MySQL
994 } 994 }
995 } 995 }
996 996
997 #region RegionEnvironmentSettings
998 public string LoadRegionEnvironmentSettings(UUID regionUUID)
999 {
1000 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
1001 {
1002 dbcon.Open();
1003
1004 string command = "select * from `regionenvironment` where region_id = ?region_id";
1005
1006 using (MySqlCommand cmd = new MySqlCommand(command))
1007 {
1008 cmd.Connection = dbcon;
1009
1010 cmd.Parameters.AddWithValue("?region_id", regionUUID.ToString());
1011
1012 IDataReader result = ExecuteReader(cmd);
1013 if (!result.Read())
1014 {
1015 return String.Empty;
1016 }
1017 else
1018 {
1019 return Convert.ToString(result["llsd_settings"]);
1020 }
1021 }
1022 }
1023 }
1024
1025 public void StoreRegionEnvironmentSettings(UUID regionUUID, string settings)
1026 {
1027 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
1028 {
1029 dbcon.Open();
1030
1031 using (MySqlCommand cmd = dbcon.CreateCommand())
1032 {
1033 cmd.CommandText = "REPLACE INTO `regionenvironment` (`region_id`, `llsd_settings`) VALUES (?region_id, ?llsd_settings)";
1034
1035 cmd.Parameters.AddWithValue("region_id", regionUUID);
1036 cmd.Parameters.AddWithValue("llsd_settings", settings);
1037
1038 ExecuteNonQuery(cmd);
1039 }
1040 }
1041 }
1042
1043 public void RemoveRegionEnvironmentSettings(UUID regionUUID)
1044 {
1045 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
1046 {
1047 dbcon.Open();
1048
1049 using (MySqlCommand cmd = dbcon.CreateCommand())
1050 {
1051 cmd.CommandText = "delete from `regionenvironment` where region_id = ?region_id";
1052 cmd.Parameters.AddWithValue("?region_id", regionUUID.ToString());
1053 ExecuteNonQuery(cmd);
1054 }
1055 }
1056 }
1057 #endregion
1058
997 public virtual void StoreRegionSettings(RegionSettings rs) 1059 public virtual void StoreRegionSettings(RegionSettings rs)
998 { 1060 {
999 lock (m_dbLock) 1061 lock (m_dbLock)