aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLGroupsData.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLGroupsData.cs23
1 files changed, 11 insertions, 12 deletions
diff --git a/OpenSim/Data/MySQL/MySQLGroupsData.cs b/OpenSim/Data/MySQL/MySQLGroupsData.cs
index afa499e..4e73ee7 100644
--- a/OpenSim/Data/MySQL/MySQLGroupsData.cs
+++ b/OpenSim/Data/MySQL/MySQLGroupsData.cs
@@ -133,10 +133,10 @@ namespace OpenSim.Data.MySQL
133 133
134 public bool DeleteMember(UUID groupID, string pricipalID) 134 public bool DeleteMember(UUID groupID, string pricipalID)
135 { 135 {
136 return m_Membership.Delete(new string[] { "GroupID", "PrincipalID" }, 136 return m_Membership.Delete(new string[] { "GroupID", "PrincipalID" },
137 new string[] { groupID.ToString(), pricipalID }); 137 new string[] { groupID.ToString(), pricipalID });
138 } 138 }
139 139
140 public int MemberCount(UUID groupID) 140 public int MemberCount(UUID groupID)
141 { 141 {
142 return (int)m_Membership.GetCount("GroupID", groupID.ToString()); 142 return (int)m_Membership.GetCount("GroupID", groupID.ToString());
@@ -168,7 +168,7 @@ namespace OpenSim.Data.MySQL
168 168
169 public bool DeleteRole(UUID groupID, UUID roleID) 169 public bool DeleteRole(UUID groupID, UUID roleID)
170 { 170 {
171 return m_Roles.Delete(new string[] { "GroupID", "RoleID" }, 171 return m_Roles.Delete(new string[] { "GroupID", "RoleID" },
172 new string[] { groupID.ToString(), roleID.ToString() }); 172 new string[] { groupID.ToString(), roleID.ToString() });
173 } 173 }
174 174
@@ -360,7 +360,7 @@ namespace OpenSim.Data.MySQL
360 get { return GetType().Assembly; } 360 get { return GetType().Assembly; }
361 } 361 }
362 362
363 public MySqlGroupsGroupsHandler(string connectionString, string realm, string store) 363 public MySqlGroupsGroupsHandler(string connectionString, string realm, string store)
364 : base(connectionString, realm, store) 364 : base(connectionString, realm, store)
365 { 365 {
366 } 366 }
@@ -375,7 +375,7 @@ namespace OpenSim.Data.MySQL
375 get { return GetType().Assembly; } 375 get { return GetType().Assembly; }
376 } 376 }
377 377
378 public MySqlGroupsMembershipHandler(string connectionString, string realm) 378 public MySqlGroupsMembershipHandler(string connectionString, string realm)
379 : base(connectionString, realm, string.Empty) 379 : base(connectionString, realm, string.Empty)
380 { 380 {
381 } 381 }
@@ -390,7 +390,7 @@ namespace OpenSim.Data.MySQL
390 get { return GetType().Assembly; } 390 get { return GetType().Assembly; }
391 } 391 }
392 392
393 public MySqlGroupsRolesHandler(string connectionString, string realm) 393 public MySqlGroupsRolesHandler(string connectionString, string realm)
394 : base(connectionString, realm, string.Empty) 394 : base(connectionString, realm, string.Empty)
395 { 395 {
396 } 396 }
@@ -405,7 +405,7 @@ namespace OpenSim.Data.MySQL
405 get { return GetType().Assembly; } 405 get { return GetType().Assembly; }
406 } 406 }
407 407
408 public MySqlGroupsRoleMembershipHandler(string connectionString, string realm) 408 public MySqlGroupsRoleMembershipHandler(string connectionString, string realm)
409 : base(connectionString, realm, string.Empty) 409 : base(connectionString, realm, string.Empty)
410 { 410 {
411 } 411 }
@@ -420,7 +420,7 @@ namespace OpenSim.Data.MySQL
420 get { return GetType().Assembly; } 420 get { return GetType().Assembly; }
421 } 421 }
422 422
423 public MySqlGroupsInvitesHandler(string connectionString, string realm) 423 public MySqlGroupsInvitesHandler(string connectionString, string realm)
424 : base(connectionString, realm, string.Empty) 424 : base(connectionString, realm, string.Empty)
425 { 425 {
426 } 426 }
@@ -431,8 +431,7 @@ namespace OpenSim.Data.MySQL
431 431
432 using (MySqlCommand cmd = new MySqlCommand()) 432 using (MySqlCommand cmd = new MySqlCommand())
433 { 433 {
434 cmd.CommandText = String.Format("delete from {0} where TMStamp < ?tstamp", m_Realm); 434 cmd.CommandText = String.Format("delete from {0} where TMStamp < NOW() - INTERVAL 2 WEEK", m_Realm);
435 cmd.Parameters.AddWithValue("?tstamp", now - 14 * 24 * 60 * 60); // > 2 weeks old
436 435
437 ExecuteNonQuery(cmd); 436 ExecuteNonQuery(cmd);
438 } 437 }
@@ -448,7 +447,7 @@ namespace OpenSim.Data.MySQL
448 get { return GetType().Assembly; } 447 get { return GetType().Assembly; }
449 } 448 }
450 449
451 public MySqlGroupsNoticesHandler(string connectionString, string realm) 450 public MySqlGroupsNoticesHandler(string connectionString, string realm)
452 : base(connectionString, realm, string.Empty) 451 : base(connectionString, realm, string.Empty)
453 { 452 {
454 } 453 }
@@ -476,7 +475,7 @@ namespace OpenSim.Data.MySQL
476 get { return GetType().Assembly; } 475 get { return GetType().Assembly; }
477 } 476 }
478 477
479 public MySqlGroupsPrincipalsHandler(string connectionString, string realm) 478 public MySqlGroupsPrincipalsHandler(string connectionString, string realm)
480 : base(connectionString, realm, string.Empty) 479 : base(connectionString, realm, string.Empty)
481 { 480 {
482 } 481 }