aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorDiva Canto2010-07-31 16:40:58 -0700
committerDiva Canto2010-07-31 16:40:58 -0700
commitc4ecbd1fb1ce5450b66a7de41a0e34cc3474e04a (patch)
tree0bdf9adcb49a5de2779bc2dee7c62027d3830c89 /OpenSim/Data
parentImplemented console command "show hyperlinks". (diff)
downloadopensim-SC_OLD-c4ecbd1fb1ce5450b66a7de41a0e34cc3474e04a.zip
opensim-SC_OLD-c4ecbd1fb1ce5450b66a7de41a0e34cc3474e04a.tar.gz
opensim-SC_OLD-c4ecbd1fb1ce5450b66a7de41a0e34cc3474e04a.tar.bz2
opensim-SC_OLD-c4ecbd1fb1ce5450b66a7de41a0e34cc3474e04a.tar.xz
White space from previous commit.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/IRegionData.cs8
-rw-r--r--OpenSim/Data/MSSQL/MSSQLRegionData.cs54
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs50
-rw-r--r--OpenSim/Data/Null/NullRegionData.cs58
4 files changed, 85 insertions, 85 deletions
diff --git a/OpenSim/Data/IRegionData.cs b/OpenSim/Data/IRegionData.cs
index 9f08e04..42533c6 100644
--- a/OpenSim/Data/IRegionData.cs
+++ b/OpenSim/Data/IRegionData.cs
@@ -58,11 +58,11 @@ namespace OpenSim.Data
58 58
59 bool SetDataItem(UUID principalID, string item, string value); 59 bool SetDataItem(UUID principalID, string item, string value);
60 60
61 bool Delete(UUID regionID); 61 bool Delete(UUID regionID);
62 62
63 List<RegionData> GetDefaultRegions(UUID scopeID); 63 List<RegionData> GetDefaultRegions(UUID scopeID);
64 List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y); 64 List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y);
65 List<RegionData> GetHyperlinks(UUID scopeID); 65 List<RegionData> GetHyperlinks(UUID scopeID);
66 } 66 }
67 67
68 [Flags] 68 [Flags]
diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
index 73c67d4..9656be1 100644
--- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
@@ -306,37 +306,37 @@ namespace OpenSim.Data.MSSQL
306 return true; 306 return true;
307 } 307 }
308 return false; 308 return false;
309 } 309 }
310 310
311 public List<RegionData> GetDefaultRegions(UUID scopeID) 311 public List<RegionData> GetDefaultRegions(UUID scopeID)
312 { 312 {
313 return Get((int)RegionFlags.DefaultRegion, scopeID); 313 return Get((int)RegionFlags.DefaultRegion, scopeID);
314 } 314 }
315 315
316 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) 316 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
317 { 317 {
318 // TODO: distance-sort results 318 // TODO: distance-sort results
319 return Get((int)RegionFlags.FallbackRegion, scopeID); 319 return Get((int)RegionFlags.FallbackRegion, scopeID);
320 } 320 }
321 321
322 public List<RegionData> GetHyperlinks(UUID scopeID) 322 public List<RegionData> GetHyperlinks(UUID scopeID)
323 { 323 {
324 return Get((int)RegionFlags.Hyperlink, scopeID); 324 return Get((int)RegionFlags.Hyperlink, scopeID);
325 } 325 }
326 326
327 private List<RegionData> Get(int regionFlags, UUID scopeID) 327 private List<RegionData> Get(int regionFlags, UUID scopeID)
328 { 328 {
329 string sql = "SELECT * FROM [" + m_Realm + "] WHERE (flags & " + regionFlags.ToString() + ") <> 0"; 329 string sql = "SELECT * FROM [" + m_Realm + "] WHERE (flags & " + regionFlags.ToString() + ") <> 0";
330 if (scopeID != UUID.Zero) 330 if (scopeID != UUID.Zero)
331 sql += " AND ScopeID = @scopeID"; 331 sql += " AND ScopeID = @scopeID";
332 332
333 using (SqlConnection conn = new SqlConnection(m_ConnectionString)) 333 using (SqlConnection conn = new SqlConnection(m_ConnectionString))
334 using (SqlCommand cmd = new SqlCommand(sql, conn)) 334 using (SqlCommand cmd = new SqlCommand(sql, conn))
335 { 335 {
336 cmd.Parameters.Add(m_database.CreateParameter("@scopeID", scopeID)); 336 cmd.Parameters.Add(m_database.CreateParameter("@scopeID", scopeID));
337 conn.Open(); 337 conn.Open();
338 return RunCommand(cmd); 338 return RunCommand(cmd);
339 } 339 }
340 } 340 }
341 } 341 }
342} 342}
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index 6dc62c6..aec37e2 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -280,35 +280,35 @@ namespace OpenSim.Data.MySQL
280 } 280 }
281 281
282 return false; 282 return false;
283 } 283 }
284 284
285 public List<RegionData> GetDefaultRegions(UUID scopeID) 285 public List<RegionData> GetDefaultRegions(UUID scopeID)
286 { 286 {
287 return Get((int)RegionFlags.DefaultRegion, scopeID); 287 return Get((int)RegionFlags.DefaultRegion, scopeID);
288 } 288 }
289 289
290 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) 290 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
291 { 291 {
292 // TODO: distance-sort results 292 // TODO: distance-sort results
293 return Get((int)RegionFlags.FallbackRegion, scopeID); 293 return Get((int)RegionFlags.FallbackRegion, scopeID);
294 } 294 }
295 295
296 public List<RegionData> GetHyperlinks(UUID scopeID) 296 public List<RegionData> GetHyperlinks(UUID scopeID)
297 { 297 {
298 return Get((int)RegionFlags.Hyperlink, scopeID); 298 return Get((int)RegionFlags.Hyperlink, scopeID);
299 } 299 }
300 300
301 private List<RegionData> Get(int regionFlags, UUID scopeID) 301 private List<RegionData> Get(int regionFlags, UUID scopeID)
302 { 302 {
303 string command = "select * from `" + m_Realm + "` where (flags & " + regionFlags.ToString() + ") <> 0"; 303 string command = "select * from `" + m_Realm + "` where (flags & " + regionFlags.ToString() + ") <> 0";
304 if (scopeID != UUID.Zero) 304 if (scopeID != UUID.Zero)
305 command += " and ScopeID = ?scopeID"; 305 command += " and ScopeID = ?scopeID";
306 306
307 MySqlCommand cmd = new MySqlCommand(command); 307 MySqlCommand cmd = new MySqlCommand(command);
308 308
309 cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); 309 cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString());
310 310
311 return RunCommand(cmd); 311 return RunCommand(cmd);
312 } 312 }
313 } 313 }
314} 314}
diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs
index 397b32d..f276d10 100644
--- a/OpenSim/Data/Null/NullRegionData.cs
+++ b/OpenSim/Data/Null/NullRegionData.cs
@@ -49,8 +49,8 @@ namespace OpenSim.Data.Null
49 if (Instance == null) 49 if (Instance == null)
50 Instance = this; 50 Instance = this;
51 //Console.WriteLine("[XXX] NullRegionData constructor"); 51 //Console.WriteLine("[XXX] NullRegionData constructor");
52 } 52 }
53 53
54 public List<RegionData> Get(string regionName, UUID scopeID) 54 public List<RegionData> Get(string regionName, UUID scopeID)
55 { 55 {
56 if (Instance != this) 56 if (Instance != this)
@@ -160,37 +160,37 @@ namespace OpenSim.Data.Null
160 m_regionData.Remove(regionID); 160 m_regionData.Remove(regionID);
161 161
162 return true; 162 return true;
163 } 163 }
164 164
165 public List<RegionData> GetDefaultRegions(UUID scopeID) 165 public List<RegionData> GetDefaultRegions(UUID scopeID)
166 { 166 {
167 return Get((int)RegionFlags.DefaultRegion, scopeID); 167 return Get((int)RegionFlags.DefaultRegion, scopeID);
168 } 168 }
169 169
170 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) 170 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
171 { 171 {
172 return Get((int)RegionFlags.FallbackRegion, scopeID); 172 return Get((int)RegionFlags.FallbackRegion, scopeID);
173 } 173 }
174 174
175 public List<RegionData> GetHyperlinks(UUID scopeID) 175 public List<RegionData> GetHyperlinks(UUID scopeID)
176 { 176 {
177 return Get((int)RegionFlags.Hyperlink, scopeID); 177 return Get((int)RegionFlags.Hyperlink, scopeID);
178 } 178 }
179 179
180 private List<RegionData> Get(int regionFlags, UUID scopeID) 180 private List<RegionData> Get(int regionFlags, UUID scopeID)
181 { 181 {
182 if (Instance != this) 182 if (Instance != this)
183 return Instance.Get(regionFlags, scopeID); 183 return Instance.Get(regionFlags, scopeID);
184 184
185 List<RegionData> ret = new List<RegionData>(); 185 List<RegionData> ret = new List<RegionData>();
186 186
187 foreach (RegionData r in m_regionData.Values) 187 foreach (RegionData r in m_regionData.Values)
188 { 188 {
189 if ((Convert.ToInt32(r.Data["flags"]) & regionFlags) != 0) 189 if ((Convert.ToInt32(r.Data["flags"]) & regionFlags) != 0)
190 ret.Add(r); 190 ret.Add(r);
191 } 191 }
192 192
193 return ret; 193 return ret;
194 } 194 }
195 } 195 }
196} \ No newline at end of file 196} \ No newline at end of file