aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
authorMelanie2011-03-27 21:22:31 +0100
committerMelanie2011-03-27 21:22:31 +0100
commitf25749f0259bdfe334f77ab049ac5f892135bbc6 (patch)
tree5fd38027cbe794a1da1d87009f9975d3792f085a /OpenSim/Data/MySQL
parentDon't send a windlight profile to clients if windlight is not set for (diff)
parentAdd SignpostMarv to contributors (diff)
downloadopensim-SC-f25749f0259bdfe334f77ab049ac5f892135bbc6.zip
opensim-SC-f25749f0259bdfe334f77ab049ac5f892135bbc6.tar.gz
opensim-SC-f25749f0259bdfe334f77ab049ac5f892135bbc6.tar.bz2
opensim-SC-f25749f0259bdfe334f77ab049ac5f892135bbc6.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLEstateData.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs
index de72a6a..6d72e82 100644
--- a/OpenSim/Data/MySQL/MySQLEstateData.cs
+++ b/OpenSim/Data/MySQL/MySQLEstateData.cs
@@ -413,6 +413,46 @@ namespace OpenSim.Data.MySQL
413 return DoLoad(cmd, UUID.Zero, false); 413 return DoLoad(cmd, UUID.Zero, false);
414 } 414 }
415 } 415 }
416
417 public List<EstateSettings> LoadEstateSettingsAll()
418 {
419 List<EstateSettings> allEstateSettings = new List<EstateSettings>();
420
421 List<int> allEstateIds = GetEstatesAll();
422
423 foreach (int estateId in allEstateIds)
424 allEstateSettings.Add(LoadEstateSettings(estateId));
425
426 return allEstateSettings;
427 }
428
429 public List<int> GetEstatesAll()
430 {
431 List<int> result = new List<int>();
432
433 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
434 {
435 dbcon.Open();
436
437 using (MySqlCommand cmd = dbcon.CreateCommand())
438 {
439 cmd.CommandText = "select estateID from estate_settings";
440
441 using (IDataReader reader = cmd.ExecuteReader())
442 {
443 while (reader.Read())
444 {
445 result.Add(Convert.ToInt32(reader["EstateID"]));
446 }
447 reader.Close();
448 }
449 }
450
451 dbcon.Close();
452 }
453
454 return result;
455 }
416 456
417 public List<int> GetEstates(string search) 457 public List<int> GetEstates(string search)
418 { 458 {