From f58941e89f122c2e1fd54a2f817fb8114e6c80ed Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 5 Apr 2011 01:30:13 +0100 Subject: Make the "All Estates" option work from the client (this makes chosen changes to all the estates that the user owns). This applies to adding/removing estate users, groups, managers and bans. This is the application of the AllEstates_0.5.patch from http://opensimulator.org/mantis/view.php?id=5420 Thanks very much, Snoopy! --- OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs') diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs index ad28c00..4dd225f 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs @@ -401,7 +401,29 @@ namespace OpenSim.Data.SQLiteLegacy return result; } - + + public List GetEstatesByOwner(UUID ownerID) + { + List result = new List(); + + string sql = "select EstateID from estate_settings where estate_settings.EstateOwner = :EstateOwner"; + + SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); + + cmd.CommandText = sql; + cmd.Parameters.Add(":EstateOwner", ownerID); + + 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(); -- cgit v1.1