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:
Justin Clark-Casey (justincc)
2011-03-21 21:37:06 +00:00
parent f4a30f3a23
commit d3a20a1e92
8 changed files with 172 additions and 1 deletions

View File

@@ -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)
{