mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
On initial region registration, if the user chooses the option to make the region part of an existing estate, then list the existing region names.
This commit is contained in:
@@ -350,26 +350,43 @@ namespace OpenSim.Data.MSSQL
|
||||
|
||||
public EstateSettings LoadEstateSettings(int estateID)
|
||||
{
|
||||
// TODO: Implementation!
|
||||
return new EstateSettings();
|
||||
}
|
||||
|
||||
public List<EstateSettings> LoadEstateSettingsAll()
|
||||
{
|
||||
// TODO: Implementation!
|
||||
return new List<EstateSettings>();
|
||||
}
|
||||
|
||||
public List<int> GetEstates(string search)
|
||||
{
|
||||
// TODO: Implementation!
|
||||
return new List<int>();
|
||||
}
|
||||
|
||||
public List<int> GetEstatesAll()
|
||||
{
|
||||
// TODO: Implementation!
|
||||
return new List<int>();
|
||||
}
|
||||
|
||||
public bool LinkRegion(UUID regionID, int estateID)
|
||||
{
|
||||
// TODO: Implementation!
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<UUID> GetRegions(int estateID)
|
||||
{
|
||||
// TODO: Implementation!
|
||||
return new List<UUID>();
|
||||
}
|
||||
|
||||
public bool DeleteEstate(int estateID)
|
||||
{
|
||||
// TODO: Implementation!
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -413,6 +413,46 @@ namespace OpenSim.Data.MySQL
|
||||
return DoLoad(cmd, UUID.Zero, false);
|
||||
}
|
||||
}
|
||||
|
||||
public List<EstateSettings> LoadEstateSettingsAll()
|
||||
{
|
||||
List<EstateSettings> allEstateSettings = new List<EstateSettings>();
|
||||
|
||||
List<int> allEstateIds = GetEstatesAll();
|
||||
|
||||
foreach (int estateId in allEstateIds)
|
||||
allEstateSettings.Add(LoadEstateSettings(estateId));
|
||||
|
||||
return allEstateSettings;
|
||||
}
|
||||
|
||||
public List<int> GetEstatesAll()
|
||||
{
|
||||
List<int> result = new List<int>();
|
||||
|
||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||
{
|
||||
dbcon.Open();
|
||||
|
||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "select estateID from estate_settings";
|
||||
|
||||
using (IDataReader reader = cmd.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
result.Add(Convert.ToInt32(reader["EstateID"]));
|
||||
}
|
||||
reader.Close();
|
||||
}
|
||||
}
|
||||
|
||||
dbcon.Close();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<int> GetEstates(string search)
|
||||
{
|
||||
|
||||
@@ -357,6 +357,17 @@ namespace OpenSim.Data.SQLite
|
||||
|
||||
return DoLoad(cmd, UUID.Zero, false);
|
||||
}
|
||||
|
||||
public List<EstateSettings> LoadEstateSettingsAll()
|
||||
{
|
||||
List<EstateSettings> estateSettings = new List<EstateSettings>();
|
||||
|
||||
List<int> estateIds = GetEstatesAll();
|
||||
foreach (int estateId in estateIds)
|
||||
estateSettings.Add(LoadEstateSettings(estateId));
|
||||
|
||||
return estateSettings;
|
||||
}
|
||||
|
||||
public List<int> GetEstates(string search)
|
||||
{
|
||||
@@ -379,6 +390,27 @@ namespace OpenSim.Data.SQLite
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<int> GetEstatesAll()
|
||||
{
|
||||
List<int> result = new List<int>();
|
||||
|
||||
string sql = "select EstateID from estate_settings";
|
||||
|
||||
SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
|
||||
|
||||
cmd.CommandText = sql;
|
||||
|
||||
IDataReader r = cmd.ExecuteReader();
|
||||
|
||||
while (r.Read())
|
||||
{
|
||||
result.Add(Convert.ToInt32(r["EstateID"]));
|
||||
}
|
||||
r.Close();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool LinkRegion(UUID regionID, int estateID)
|
||||
{
|
||||
|
||||
@@ -100,6 +100,17 @@ namespace OpenSim.Data.SQLiteLegacy
|
||||
|
||||
return DoLoad(cmd, regionID, create);
|
||||
}
|
||||
|
||||
public List<EstateSettings> LoadEstateSettingsAll()
|
||||
{
|
||||
List<EstateSettings> estateSettings = new List<EstateSettings>();
|
||||
|
||||
List<int> estateIds = GetEstatesAll();
|
||||
foreach (int estateId in estateIds)
|
||||
estateSettings.Add(LoadEstateSettings(estateId));
|
||||
|
||||
return estateSettings;
|
||||
}
|
||||
|
||||
private EstateSettings DoLoad(SqliteCommand cmd, UUID regionID, bool create)
|
||||
{
|
||||
@@ -369,6 +380,28 @@ namespace OpenSim.Data.SQLiteLegacy
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public List<int> GetEstatesAll()
|
||||
{
|
||||
List<int> result = new List<int>();
|
||||
|
||||
string sql = "select EstateID from estate_settings";
|
||||
|
||||
SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
|
||||
|
||||
cmd.CommandText = sql;
|
||||
|
||||
IDataReader r = cmd.ExecuteReader();
|
||||
|
||||
while (r.Read())
|
||||
{
|
||||
result.Add(Convert.ToInt32(r["EstateID"]));
|
||||
}
|
||||
r.Close();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool LinkRegion(UUID regionID, int estateID)
|
||||
{
|
||||
SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand();
|
||||
|
||||
Reference in New Issue
Block a user